greenbarbi
03-10-2009, 12:25 PM
Hi,
I have a website which runs primarily on html, but I call some dynamic content using <?php include 'list.php' ?> inside the body tag of index.html.
<html>
....
<body>
....
<?php include 'list.php' ; ?>
...
</body>
</html>
The domain is redirected to public_html/myproject (index.html and list.php is present here). Now only the html shows up. The php content is not included. (the list does not show up, works fine in local machine) How do I include php on html files?
What changes should I make?
1. I tried adding a .htaccess in the myproject folder with the content
AddType application/x-httpd-php5 .html .php
AddHandler application/x-httpd-php5 .html
But it throws a 500 error.
2. Should I make any changes to php.ini file? [ There is no php.ini file in the sub directory as of now. Is it required? ]
3. I also tried adding a apache handler in the bluehost control panel, but in vain.
Desperately in need of a solution. Appreciate any quick response, Thanks
Barbi
I have a website which runs primarily on html, but I call some dynamic content using <?php include 'list.php' ?> inside the body tag of index.html.
<html>
....
<body>
....
<?php include 'list.php' ; ?>
...
</body>
</html>
The domain is redirected to public_html/myproject (index.html and list.php is present here). Now only the html shows up. The php content is not included. (the list does not show up, works fine in local machine) How do I include php on html files?
What changes should I make?
1. I tried adding a .htaccess in the myproject folder with the content
AddType application/x-httpd-php5 .html .php
AddHandler application/x-httpd-php5 .html
But it throws a 500 error.
2. Should I make any changes to php.ini file? [ There is no php.ini file in the sub directory as of now. Is it required? ]
3. I also tried adding a apache handler in the bluehost control panel, but in vain.
Desperately in need of a solution. Appreciate any quick response, Thanks
Barbi