vwinstead Posted February 4, 2009 Share Posted February 4, 2009 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? Quote Link to comment Share on other sites More sharing options...
nadeemshafi9 Posted February 4, 2009 Share Posted February 4, 2009 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 Quote Link to comment Share on other sites More sharing options...
gevans Posted February 4, 2009 Share Posted February 4, 2009 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.