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 6 of 6
  1. #1
    New Coder
    Join Date
    Jul 2002
    Location
    Ohio
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Function of Includes without PHP

    This is actually a question regarding trying not to use PHP. I was wondering if there is an alternative to using PHP Includes that produces the same effect, in simplifying updates to a menu.
    Thanks.
    Kristen

    "Doctors bury their mistakes. Lawyers hang them. But journalists put theirs on the front page."
    --Anonymous

  • #2
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Ummm does that mean you don't want to use PHP? You can include files using the traditional way without using PHP with a .shtml extension if your server supports it. You could use an external javascript file. I'm not sure if I understand your question completely.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #3
    New Coder
    Join Date
    Jul 2002
    Location
    Ohio
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I think you've got it.

    That's correct - I don't want to use PHP. I looked at resources/tutorials on Includes, and needless to say, my head's still spinning.

    Thank you
    Kristen

    "Doctors bury their mistakes. Lawyers hang them. But journalists put theirs on the front page."
    --Anonymous

  • #4
    WA
    WA is offline
    Administrator
    Join Date
    Mar 2002
    Posts
    2,596
    Thanks
    2
    Thanked 19 Times in 18 Posts
    Elaborating on Spookster's post, here's a tutorial on SSI: http://www.javascriptkit.com/howto/externalhtml3.shtml
    - George
    - JavaScript Kit- JavaScript tutorials and 400+ scripts!
    - JavaScript Reference- JavaScript reference you can relate to.

  • #5
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,040
    Thanks
    10
    Thanked 92 Times in 90 Posts
    now I would not want to pressure anyone to use PHP

    however SSI includes and PHP includes could not be much simpler, i.e.

    where title.txt contains

    <title>included title</title>

    then

    <html>
    <? include(title.txt);?>
    <body .... etc

    gives the expected result i.e.

    <html>
    <title>included title</title>
    <body .... etc


    SSI is no easier & PHP can do a lot more if required.
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #6
    New Coder
    Join Date
    Jul 2002
    Location
    Ohio
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts
    A tutorial I understand! Thanks, WA. The menu I once edited on every single page, which was beyond tedious, is now a separate file.

    Sorry, firepages. SSI already won me over, but thank you for the example. I now realize my head was spinning most likely because I was reading tutorials on PHP in general, including setting up servers, etc.

    Kristen

    "Doctors bury their mistakes. Lawyers hang them. But journalists put theirs on the front page."
    --Anonymous


  •  

    Posting Permissions

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