Northern Flame Posted January 2, 2008 Share Posted January 2, 2008 I was wondering why some pages with .html extensions can run php script and some cant? Is it something to do with the server and what your web host allows you to do? Because before I just assumed that PHP cannot be ran in a .html file, but I am now working for a guy and all his pages have the .html file extension and he has some php in there that works fine. Quote Link to comment https://forums.phpfreaks.com/topic/84193-solved-php-in-html-pages/ Share on other sites More sharing options...
mrdamien Posted January 2, 2008 Share Posted January 2, 2008 It has to do with the server configuration. You can tell apache (for example) to parse .html files through php. Quote Link to comment https://forums.phpfreaks.com/topic/84193-solved-php-in-html-pages/#findComment-428676 Share on other sites More sharing options...
revraz Posted January 2, 2008 Share Posted January 2, 2008 Look in his .htaccess file. Quote Link to comment https://forums.phpfreaks.com/topic/84193-solved-php-in-html-pages/#findComment-428680 Share on other sites More sharing options...
Northern Flame Posted January 2, 2008 Author Share Posted January 2, 2008 oh, you can change the MIME types so that you can run PHP in the website? Quote Link to comment https://forums.phpfreaks.com/topic/84193-solved-php-in-html-pages/#findComment-428683 Share on other sites More sharing options...
mrdamien Posted January 2, 2008 Share Posted January 2, 2008 Yes. You could also change it directly in the apache conf. file, but the .htaccess is probably better. Quote Link to comment https://forums.phpfreaks.com/topic/84193-solved-php-in-html-pages/#findComment-428689 Share on other sites More sharing options...
Northern Flame Posted January 2, 2008 Author Share Posted January 2, 2008 Alright Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/84193-solved-php-in-html-pages/#findComment-428696 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.