Results 1 to 8 of 8

 

Thread: HTML and PHP help

  1. #1
    Registered User

    Status
    Offline
    Join Date
    Aug 2003
    Location
    London
    Posts
    100
    Thanks
    0
    Thanked 0 Times in 0 Posts


    Hi,

    I have been playing around with PHP codes inside HTML files but can't get it to work.

    I have been trying every thing i found in Webmaster World, specialy adding the following in my .htaccess file :

    AddType application/x-httpd-php .php .php3 .phtml .html

    Tried with the code above and together with the code below.

    RewriteEngine On
    RewriteRule ^entry_(.*)\.html$ /entry.php?show=$1 [L]

    When i try to load the page/site it prompts me to save as.

    Basically i like to keep HTML pages and at the same time be able to use some PHP includes.

    Any help appreciated.

    Thanks in advance.

  2. #2
    Ian Ebbs

    Status
    Offline
    Join Date
    Aug 2003
    Location
    England
    Posts
    1,096
    Thanks
    5
    Thanked 6 Times in 2 Posts
    Do normal PHP pages work for you?

    If not is your server PHP enabled?

    If PHP is enabled then the following on its own should work:

    AddType application/x-httpd-php .html

    drop the rewrite rule though, you shouldn't need that

    affiliates4u Fantasy Football Winner 2007/08

  3. #3
    Registered User

    Status
    Offline
    Join Date
    Aug 2003
    Location
    London
    Posts
    100
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hi Ian,

    I have tried with the code you provided.

    The problem is when trying to access a page the page is saved automatically to the temporary internet folder and then opens without parsing the PHP and without the images.

    I have have PHP enabled.

  4. #4
    Registered User

    Status
    Offline
    Join Date
    Aug 2003
    Location
    London
    Posts
    100
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Just tried the above with a different host and it does work. I guess One & One don't support this and neither do they help you.

    Anyway thanks Ian. Is there any other way I can get around this with One & One?

  5. #5
    Super Member

    Status
    Offline
    Join Date
    Aug 2003
    Location
    Costa Del Sheffield
    Posts
    2,838
    Thanks
    5
    Thanked 18 Times in 14 Posts
    dont really know about one & one, but if you were just using the php includes you could parse html pages as shtml and use SSI includes
    Dan Morley
    alpharooms.com
    daniel at alpharooms dot com - Hotels, Flights, Airport Transfers, Care Hire + More! sign up
    My Blog | Cheap Holidays

  6. #6
    Ian Ebbs

    Status
    Offline
    Join Date
    Aug 2003
    Location
    England
    Posts
    1,096
    Thanks
    5
    Thanked 6 Times in 2 Posts
    I don't know how apache is set up with one & one, but for the .htacess rule to work you need to be allowed to have file type overrides in your httpd.conf file.

    It will be a line something like

    AllowOverride None

    and you need it to be AllowOverride FileInfo

    if it currently says All, then i'm still not sure what is up with it, as that should mean the FileInfo bit is working.

    I have some similar problems with a server I got from West Host this week, my tech guy will take a look next week and i'll let you know anything else that might help you.

    affiliates4u Fantasy Football Winner 2007/08

  7. #7
    Ian Ebbs

    Status
    Offline
    Join Date
    Aug 2003
    Location
    England
    Posts
    1,096
    Thanks
    5
    Thanked 6 Times in 2 Posts
    Right I've managed to fix mine and I hope this helps you too, I had a little conflict with ssi handlers and php handlers in my httpd.conf file

    So I hashed out the following line and it works fine now.

    #AddHandler server-parsed .shtml .html .htm

    You may have something similar in your set up, hope it helps.

    affiliates4u Fantasy Football Winner 2007/08

  8. #8
    Registered User

    Status
    Offline
    Join Date
    Aug 2003
    Location
    London
    Posts
    100
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks Ian.

    Its still not working for me. I think i'll have to start developing in PHP. Just didn't want to change all those files from HTML to PHP.

    I can get SSI to work but not PHP Scripts in HTML.



Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Simple HTML or PHP?
    By Silverfern in forum Affiliate Marketing Lounge
    Replies: 14
    Last Post: 16-04-05, 11:49 AM
  2. Php -> Html
    By Frostie in forum Programming
    Replies: 5
    Last Post: 22-11-04, 04:46 PM
  3. html email, how would one send one
    By morleymouse in forum Programming
    Replies: 6
    Last Post: 10-11-04, 01:12 PM
  4. Scripts for turning HTML into PHP
    By tomj in forum Programming
    Replies: 11
    Last Post: 28-06-04, 10:22 PM

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
  •  
To Top

Content Relevant URLs by vBSEO 3.5.0 RC2