FOAK: PHP

Discussion in 'UK Motorcycles' started by Derek Turner, Oct 27, 2009.

  1. Derek Turner

    Derek Turner Guest

    I'm re-engineering a web-site for my choir.

    I've used:

    <div id="nav"><?php include("nav.php"); ?></div>
    <div id="top"><?php include("top.php"); ?></div>

    so that the navigation side-bar and top-bar (which are the same on every
    page) can be easily edited. So far so good, it works well.

    BUT only if I give the pages the .php extension.

    You can see the result here

    <www.cantabilejersey.com/experimental>

    I'd really prefer to use the .html extension.

    If I put

    AddType text/x-server-parsed-html .html

    in the .htaccess file then the server parses the .html without sending a
    server-error but seems to return a .PHTML.part to the browser, which
    seems to bork Firefox.

    What have I missed?

    I get the same problem if I use the SSI/shtml route, by the way.
     
    Derek Turner, Oct 27, 2009
    #1
    1. Advertisements

  2. Derek Turner

    Jim Guest

    You're barking up the wrong tree. If you want to write PHP code in .html
    files you should be writing something like:

    AddType application/x-httpd-php .php .html
     
    Jim, Oct 27, 2009
    #2
    1. Advertisements

  3. Derek Turner

    Derek Turner Guest

    Thanks very much - I'll give it a go.
     
    Derek Turner, Oct 27, 2009
    #3
  4. Derek Turner

    Buzby Guest

    I'd get rid of the frames as well - a complete PITA for all
     
    Buzby, Oct 27, 2009
    #4
  5. Derek Turner

    Jim Guest

    Those aren't frames, it is a CSS layout lovingly handcrafted to simulate
    frames. Although why you'd want to do that beats me!
     
    Jim, Oct 27, 2009
    #5
  6. Derek Turner

    Buzby Guest

    So it is. Sheer genius.
     
    Buzby, Oct 27, 2009
    #6
  7. Derek Turner

    Derek Turner Guest

    Frames were popular in their time for /some/ good reasons: having
    navigation stay put was one of them, though I agree they soon became a
    right royal PITA.

    Have a look at the design I'm working to <www.cantabilejersey.com> the
    challenge is to keep the design and functionality while degrading
    gracefully, being standards-compliant and meeting accessibility standards
    (none of which the original does). I'm also rather anti-flash (don't see
    why anyone should have to install plug-ins to view a page properly). I've
    changed the news-scroller and slide-shows to run in javascript instead
    (and for the pages to be readable if javascript is not enabled).

    So the navigation-bar stays put. The stripe on the right in the original
    seemed to be a bit of a waste of space to me, too, so I used it for the
    'legal' stuff.

    So that's why I wanted to do it!
     
    Derek Turner, Oct 27, 2009
    #7
  8. Derek Turner

    Derek Turner Guest

    Derek Turner, Oct 27, 2009
    #8
  9. Derek Turner

    Derek Turner Guest

    <bad form>

    <www.cantabilejersey.com/experimental2/>

    has the first option (the one you suggested) in .htaccess
     
    Derek Turner, Oct 27, 2009
    #9
  10. Derek Turner

    Derek Turner Guest

    Thank you.
     
    Derek Turner, Oct 27, 2009
    #10
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.