Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Dec 2002
    Location
    Central New York
    Posts
    87
    Thanks
    0
    Thanked 0 Times in 0 Posts

    PHP and SSI+, Can't They All Just Get Along?

    Here's the scenario: I'm desiging a website and every page (more or less) uses SSI+'s to insert external header, quick links, resource links, section related links, and footer html pages. All is going well until on one page I need a drop box form. The idea is that a user will drop down a location from the menu, hit the submit button, and the form information will be sent to the next page which display all of the included html files, but also the information for the selected location.

    Without templating, How do I include external html files using PHP? Or, how would I set my page up so that it will be parsed by the server as both an SSI+ document and a PHP document?

    I'm stumped... Thanks in advance.
    Timothy Boronczyk

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You can't SSI parse and PHP parse the same page.

    If you're using PHP you have no need for SSI at all - there is nothing SSI can do that PHP can't do.

    Specifically:

    <?

    include ("page.html");

    ?>

  • #3
    New Coder
    Join Date
    Dec 2002
    Location
    Central New York
    Posts
    87
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Dude that was so simple! Thanks. I was rummaging on the 'net and through books and all I found was the include_path variable and require(). It works like a dream!
    Timothy Boronczyk

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    No worries; even better - you can pass variables to it:

    <?

    $variable_that_include_uses = true;
    include("dynamic_include.php");

    ?>

  • #5
    New Coder
    Join Date
    Dec 2002
    Location
    Central New York
    Posts
    87
    Thanks
    0
    Thanked 0 Times in 0 Posts
    That's neat. I don't think you can pass variables through SSI+ like you can PHP. I know at least SSI+'s don't like form post methods.
    Timothy Boronczyk


  •  

    Posting Permissions

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