Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/database/database.php:2) in /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/session/session.php on line 423

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/database/database.php:2) in /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/session/session.php on line 423

Warning: Cannot modify header information - headers already sent by (output started at /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/database/database.php:2) in /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/session/session.php on line 426

Warning: Cannot modify header information - headers already sent by (output started at /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/database/database.php:2) in /home/content/f/e/r/ferasferas1/html/scriptslibrary/templates/ja_purity/ja_templatetools.php on line 49
How to run php code embedded in html pages - The Scripts Library Community

Free Programming Tutorials & Source Code

 
  • Increase font size
  • Default font size
  • Decrease font size
Home PHP How to run php code embedded in html pages

How to run php code embedded in html pages

(0 votes, average: 0 out of 5)
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.