Results 1 to 6 of 6

Thread: PHP on HTML page

  1. #1
    Join Date
    Dec 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default PHP on HTML page

    I want to add a php on a html page so i write a below line in the .htaccess

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


    And this works absolutely fine...but my webhosting service saying now all the pages pass through php and that's why increasing the server load...

    Please tell me is that possible that i create a line just for few pages on which php is added. Those pages are stored in the root...

    Please tell me what line to use....

  2. #2
    Join Date
    Aug 2006
    Posts
    239
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    remove .html, and use .php extension

  3. #3
    Join Date
    Dec 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    if i remove .html then how php works on html page.

  4. #4
    Join Date
    Aug 2006
    Posts
    239
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    just the same way, just instead of .html, the file will have .php extension- plain and simple

  5. #5
    Join Date
    Dec 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    my friend my site have html pages with .html extension and links are set which cant be changed so .html cant be changed to php file extension

    any more suggestion.

  6. #6
    Join Date
    Aug 2005
    Posts
    971
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ashras99: may be you are not aware but php files *can* have html tags and it will parse them correctly. And if you want to put in php then you use the <?php and ?> tags.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •