I'm a newbie here trying to figure out why my simple php code is not working inside html. Files with .php extension however works fine.The page is just blank. I modified the following line
"AddType application/x-httpd-php .php" in http.conf to "AddType application/x-httpd-php .php .html"
I tried adding these lines to .htaccess file.
AddHandler x-httpd-php .html .htm
AddHandler php-script .php .html .htm
AddHandler php5-script .php .html .htm and
AddType application/x-httpd-php .htm
AddType application/x-httpd-php .html as said in most of the forums. Nothing seems to work. Please someone help me out.I'm using wamp server 2.2 and php 5.
Jump to Post
If you haven't come across this resource already, I found it useful:
It talks about the type of handler you need to use based on whether you have one or multiple versions …
Jump to Post
@rotten69 - because you can tell the web server to parse HTML files for PHP before serving the content to the browser.
Browsers do not understand PHP, even in PHP files. It's a server side scripting langauage. So even in PHP files, the file is parsed and only resulting output …
All 8 Replies
We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.