SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2004
    Location
    India
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    UNABLE TO USE pHP IN .HTML PAGE

    http://www.jalsaghar.com/index-test.html
    This page on my website is unable to run php part ... but the webpage works in my system i.e. my localhost ...

    i m unable to understand why....

  2. #2
    SitePoint Addict Athorn4941's Avatar
    Join Date
    Apr 2003
    Location
    USA
    Posts
    266
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    rename it to index-test.php see if that works. The surver you are using might be set up not to parse the php with an hml extension or not even have php installed on the server you are using.

  3. #3
    SitePoint Enthusiast
    Join Date
    Aug 2004
    Location
    India
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Php is installed in the server ... as i have several pages in php running ...
    My home page is index.html which I am redirecting to index.php because of the problem i stated above ...

    but i wanted a proper index.html instead of index.php as homepage ... that's why I was trying that ...

  4. #4
    SitePoint Zealot ceefour's Avatar
    Join Date
    Feb 2005
    Location
    Bandung, Indonesia
    Posts
    138
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually for index you can actually strip whatever it is, just use index.php and access it directly at http://www.jalsaghar.com/
    since index.php is (usually) the default file that is used to display a directory if no filename is specified, also index.html

    If you REALLY want to use .html than you need to mess up with server configuration. You need to add this in .htaccess

    AddType html application/x-httpd-php

    You can also use ForceType, mod_rewrite, or else... However I see no reason why you should insist on using .html as PHP, it just goes against the "rules"...

  5. #5
    SitePoint Enthusiast
    Join Date
    Mar 2005
    Posts
    82
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)


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
  •