Total Members: 64
How to run php code embedded in html pages
Submitted by admin on Tue, 03/18/2008 - 13:15
Embedding PHP code into html is powerful rule that most programmers use. However, you should configure your server in order to get the benefits of this feature. It will only work if your Apache server has PHP enabled (how to test php support in a apache server) and .htaccess enabled.
In the root directory of your html files create a file named .htaccess (DOThtaccess).
Open the file in your favorite editor (I use notepad) and add the following lines:
addtype application/x-httpd-php .html
addtype application/x-httpd-php .htm
That's it! Now you can run any php code you want in a html pages.
- admin's blog
- Login or register to post comments
- 114 reads