No announcement yet.

PHP-a substitute for server sides?

  • Filter
  • Time
  • Show
Clear All
new posts

  • PHP-a substitute for server sides?

    I've read a couple of comments about using PHP for what I would have used server side includes. For anyone with PHP knowledge, can you add PHP script to a page that is written in HTML?

  • #2
    The PHP scripts fail to run automatically on html pages. There are two ways to make it run on .html or .htm pages.
    (a) You must edit the .htaccess with AddType application/x-httpd-php .htm .html and insert the php code from the reader directly to your html pages

    (b) Alternately you can edit .htaccess with either .htm server parsed .html server parsed or
    Addhandler application/x-httpd-php .html .php

    While if you are using an IIS or Windows Server, you won't be able to run php on html pages directly. But you'd need to use .shtml or .php with php option from reader on windows IIS servers.


    • #3
      I'm currently using Windows, so it sounds like it might be a bit more complicated. Actually, I'm planning to upgrade soon and, in case I end up with Linux, I may wait on getting into PHP. It sounds like it would be a simpler process using a different operating system. Thanks so much for the detailed information.