Jump to content


Photo

Make .php Code Read As .html


  • This topic is locked This topic is locked
No replies to this topic

#1 TCH-Sales

TCH-Sales

    Support

  • Members
  • PipPipPipPip
  • 1,516 posts

Posted 21 August 2003 - 03:44 PM

Say you want to use a PHP include inside one of your pages, but they all have a .html extension. If you don't want to convert your page to a .php extension, just add this one simple line of code to your .htaccess file.

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

This will treat all the code in your pages as PHP before it displays it on the page.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users