![]() |
|
|
|
|
|||||||
| PHP / MySQL Assistance We understand. Not all of you are experienced programmers, but some of you are highly skilled at coding. So we've set aside this forum so you can ask questions, and provide answers to the most commonly asked PHP / MySQL issues. |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I'm trying to run a php script linked from my index.html that checks for mobile devices and then forwards if appropriate. Problem is that I can't get the php to work from within the html. I've searched and searched and tried everything here- http://forum.hostican.com/php-mysql-...run-php-t1661/, and elsewhere and when I modify the .htaccess file the browser attempts to download something?
The main site is Trevor Jones • Voice Over . Currently the .htaccess is the unmodified version as I need this site to remain accessible. Here's the php at the top of my index.html Code:
include('mobile_device_detect.php');
mobile_device_detect(true,true,true,true,'http://trevorjonesvo.com/mobile2.html/',false);?>
Code:
# -FrontPage- IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti* Last edited by sammymaudlin; 07-30-2009 at 06:37 PM. Reason: typo |
|
#2
|
||||
|
||||
|
Piece of cake. Change this
Code:
AddType application/x-httpd-php .html Code:
AddHandler application/x-httpd-php .html .htm |
|
#3
|
|||
|
|||
|
Thanks Randy. That did stop the browsers from trying to download something but now it looks like the script isn't executing. On an iPod touch it should forward to the specified site but it does not...
|
|
#4
|
|||
|
|||
|
I solved the overall issue by using a different method- Toronto Computer Repair and Business IT Support Services Provider - PC Mechanix and just adding "iphone" to the array.
Thanks. |
![]() |
| Tags |
| htaccess, php, problem |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|