main
side
curve
  1. In Memory of LAJ_FETT: Please share your remembrances and condolences HERE

PHP or SSI

Discussion in 'Archive: Fan Sites' started by dark42, Jan 20, 2003.

Thread Status:
Not open for further replies.
  1. dark42

    dark42 Jedi Youngling star 3

    Registered:
    May 16, 2002
    Anyone know how to write this kind of stuff? I know HTML, XHTML, and JavaScript - but no server-side code.

    I have no idea on these two, and I can't find any good tutorials.

    Here's what I want to write:

    index.php
    include header.htm
    include page.htm
    include middle.htm
    include menu.htm
    include footer.htm

    Whereas header, middle, and footer would be the same for all the pages on my site, and page and menu would be different for each page (defined in the php file).

    -----

    I've also heard it could be done with SSI... but I do not know if my webserver can run those (I'm pretty sure it can run PHP). But could I do it like this, too? If so, how?
     
  2. malducin

    malducin Jedi Padawan star 4

    Registered:
    Oct 23, 2001
    If your webserver runs Apache it most probably can handle SSI (unless they disabled it). Anyway I recommend PHP anyway. It was specifically designed for the web, and it's a pretty complete programming language with facilities for database use, object orientation, etc. Second there are tons of ready made free scripts for doing web site portals and content management systems that you can just install and are ready to go after configuration. Both Sourceforge.net and Hotscripts.com have tons of PHP scripts for everything.

    There are also tons of PHP tutorials out there. I started with the simple tutorials at:

    PHPBuilder
    Developer Shed

    The book Professional PHP Programming by Wrox press was also a good starting point.

    If I understand correctly, what you are trying to do would be simple in PHP. But if you are trying to do a portal style website with a consistent look and feel I would recommen downloading a few scripts designed for that and install them. At my site I use phpWebsite, which pretty much takes care of all that, but there are many others like Postnuke, PHP-CMS, Mambo, Drupal, and many others.
     
  3. Night4554

    Night4554 Jedi Grand Master star 5

    Registered:
    Oct 9, 2000
    PHP is simple to include files.

    Code html just as you would normally, but save it as a .php file.

    Then when you want to include the file put the following:

    <?php
    include('path/to/file.extention');
    ?>

    ¤Night
     
  4. dark42

    dark42 Jedi Youngling star 3

    Registered:
    May 16, 2002
    Thanks!
     
Thread Status:
Not open for further replies.