Welcome to TalkGraphics.com
Page 1 of 2 12 LastLast
Results 1 to 10 of 46

Thread: PHP, SHTML, etc

Hybrid View

  1. #1
    Join Date
    Sep 2000
    Location
    London, UK
    Posts
    1,436

    Default Re: PHP, SHTML, etc

    Ahah. I was doing it with a single page site. So if you want to handle PHP on the home page, you need to have index.htm (or index.html) with JavaScript or one of the other forwarding techniques to take the user straight to index.php, and then you can name any other pages contact_us.php, services.php etc.

    Thanks.
    Simon
    ------------------------------
    www.tlaconsultancy.co.uk
    www.bricksandbrass.co.uk

  2. #2
    Join Date
    Aug 2004
    Location
    Ukraine
    Posts
    3,904

    Default Re: PHP, SHTML, etc

    Not at all! Just leave your first page blank and name it "balnk.htm", then name your second page "index.php" and fill it with content. And so on.
    John.

  3. #3
    Join Date
    Dec 2000
    Location
    Hautes Pyrénées, France
    Posts
    5,083

    Default Re: PHP, SHTML, etc

    Quote Originally Posted by covoxer View Post
    Not at all! Just leave your first page blank and name it "balnk.htm", then name your second page "index.php" and fill it with content. And so on.
    An excellent tip and such a simple solution to an aggravating problem! And something I never thought of whilst struggling with the same problem. Many thanks - it pays to think out of the box

    balnk.htm is so difficult to spell, can I change it to blank.htm?
    If someone tried to make me dig my own grave I would say No.
    They're going to kill me anyway and I'd love to die the way I lived:
    Avoiding Manual Labour.

  4. #4
    Join Date
    Apr 2010
    Location
    Kildare, Ireland
    Posts
    906

    Default Re: PHP, SHTML, etc

    Why doesn't the program just allow renaming the home page to index.php ? It seems strange and inconvenient to me.

  5. #5
    Join Date
    Dec 2000
    Location
    Hautes Pyrénées, France
    Posts
    5,083

    Default Re: PHP, SHTML, etc

    I agree, doesn't make sense tbh. But the workaround is an acceptable solution to me.
    If someone tried to make me dig my own grave I would say No.
    They're going to kill me anyway and I'd love to die the way I lived:
    Avoiding Manual Labour.

  6. #6
    Join Date
    Aug 2007
    Location
    Maghull UK
    Posts
    6,202

    Default Re: PHP, SHTML, etc

    Only thing to watch here is that naming your first page blank.htm (or balnk-htm) means your resources folder is named blank_htm_files ... better to name the first file something meaningfull like site.htm

    "Why doesn't the program just allow renaming the home page to index.php ? It seems strange and inconvenient to me." Because the first page has to be *.htm for the preview to work.
    JOHN -XaReg (FB) XaReg (DB - ignore prompt to register)
    Windows 10 [Anniversary] pro Intel Pentium CPU G630 @ 2.70Ghz RAM: 4 GB; 64-bit x64

  7. #7
    Join Date
    Dec 2000
    Location
    Hautes Pyrénées, France
    Posts
    5,083

    Default Re: PHP, SHTML, etc

    Quote Originally Posted by neodeist View Post
    Because the first page has to be *.htm for the preview to work.
    That's not true at all. Create a page, click on preview so that you have the preview window open and then drop a preivously created php page into it. It displays just fine excepting any unparsed php code, which is what you'd expect, and is the same behaviour you get when you drop a php page into FF or IE. But there are other practical reasons why anything other than .htm/l for the default site page is a bad idea. I don't like it because it interferes with my workflow, but I understand their reasons for doing it.
    If someone tried to make me dig my own grave I would say No.
    They're going to kill me anyway and I'd love to die the way I lived:
    Avoiding Manual Labour.

  8. #8
    Join Date
    Dec 2000
    Location
    Hautes Pyrénées, France
    Posts
    5,083

    Default Re: PHP, SHTML, etc

    Quote Originally Posted by covoxer View Post
    Not at all! Just leave your first page blank and name it "balnk.htm", then name your second page "index.php" and fill it with content. And so on.
    Quote Originally Posted by neodeist View Post
    naming your first page blank.htm (or balnk-htm) means your resources folder is named blank_htm_files ... better to name the first file something meaningfull like "site.htm"
    I keep coming back to this combination of posts and it is possibly one of the most valuable usability tips I have found to those of us who use php/ssi.
    If someone tried to make me dig my own grave I would say No.
    They're going to kill me anyway and I'd love to die the way I lived:
    Avoiding Manual Labour.

  9. #9
    Join Date
    Aug 2004
    Location
    Ukraine
    Posts
    3,904

    Default Re: PHP, SHTML, etc

    Quote Originally Posted by xtom View Post
    Why doesn't the program just allow renaming the home page to index.php ?
    This was explained before. John is right, it is a sort of foolproof feature.
    John.

  10. #10
    Join Date
    Apr 2010
    Location
    Kildare, Ireland
    Posts
    906

    Default Re: PHP, SHTML, etc

    It's a foolproof feature that causes confusion

 

 

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
  •