Jump to content

newbie question: running php from html files


vwinstead

Recommended Posts

Newbie question:  I have index.html as my main site file.  Can I use php within that file?  Or do I NEED to run php only within a php file?

 

 

there may be soem way to use php on that file by changing the web servers config to parse all html files wihc would be silly better off rename teh file .php

If you're using Apache and have access to your httpd.conf file look for the line;

 

AddType application/x-httpd-php .php

 

It may have other extensions as well, to enable .html files to be parsed as php add the following

 

AddType application/x-httpd-php .php .html

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.