Reorganizing Large Web Site

Discussion in 'HTML' started by Mike Copeland, Jan 8, 2012.

  1. I'm having difficulty with my attempts to reorganize my large Web
    site files. For the past 13 years I've been building and adding to this
    site (www.raceplaceevents.com) by placing all files in the root
    directory. (I never had time to do it right...)
    Now, I'm modifying the root index files to use subdirectories, as
    well as move the data files there. The root files (originally prepared
    by someone else) are .PHP files and have "include links" that now don't
    work. The directory structure looks like this:

    /
    /include/
    /results/
    /images/

    I moved data files to "results", and I've taken a root link that used
    to point to data links within that file (it's now quite large!) with
    this:

    <a href="#1998">1998</a>

    and changed it to:

    <a href="results/results1998.php">1998</a>

    I rebuilt the internal link tables that housed the links to the data
    files:

    <tr>
    <td class="header_text" align="center">1998<A NAME="1998"></a>
    </td>
    </tr>
    <tr>
    <td class="bordered_text">
    <table width="100%" class="page_text">
    <tr>
    <th style="width:100px">Event Date</th><th>Event Name</th>
    </tr>
    <tr>
    <td>December 13</td>
    <td><a href="fbt98res.htm" >Insight Fiesta Bowl 10K</a>
    </td>
    </tr>
    </table>
    [etc.]
    </tr>

    The new reference finds the new file (that's now in /results/), but
    this modified file has some boilerplate "include" links that don't work
    now because they're based off the directory root, not the lower
    "results" directory where this file now resides (e.g.):

    <? include "include/page_top.php"; ?>

    My question is: how do I modify the "include" statements to reference
    the root directory? (I know this is a remedial query, but my experience
    is only with DOS and Windows file organizations, not what exists on my
    Web site.) 8<{{ Please advise TIA
    Mike Copeland, Jan 8, 2012
    #1
    1. Advertising

  2. Mike Copeland

    dorayme Guest

    In article
    <-september.org>,
    (Mike Copeland) wrote:

    > The new reference finds the new file (that's now in /results/), but
    > this modified file has some boilerplate "include" links that don't work
    > now because they're based off the directory root, not the lower
    > "results" directory where this file now resides (e.g.):
    >
    > <? include "include/page_top.php"; ?>
    >
    > My question is: how do I modify the "include" statements to reference
    > the root directory? (I know this is a remedial query, but my experience
    > is only with DOS and Windows file organizations, not what exists on my
    > Web site.) 8<{{ Please advise TIA


    Try <? include "../include/page_top"; ?> in your case

    I often use on Unix servers constructions like

    <?php include
    ($_SERVER['DOCUMENT_ROOT'].'/includes/pageNav.inc'); ?>

    for their portability.

    --
    dorayme
    dorayme, Jan 8, 2012
    #2
    1. Advertising

  3. Mike Copeland

    Peter Guest

    In article <-september.org>,
    says...
    > I'm having difficulty with my attempts to reorganize my large Web
    > site files. For the past 13 years I've been building and adding to this
    > site (www.raceplaceevents.com) by placing all files in the root
    > directory. (I never had time to do it right...)
    > Now, I'm modifying the root index files to use subdirectories, as
    > well as move the data files there. The root files (originally prepared
    > by someone else) are .PHP files and have "include links" that now don't
    > work. The directory structure looks like this:
    >
    > /
    > /include/
    > /results/
    > /images/
    >
    > I moved data files to "results", and I've taken a root link that used
    > to point to data links within that file (it's now quite large!) with
    > this:
    >
    > <a href="#1998">1998</a>
    >
    > and changed it to:
    >
    > <a href="results/results1998.php">1998</a>
    >
    > I rebuilt the internal link tables that housed the links to the data
    > files:
    >
    > <tr>
    > <td class="header_text" align="center">1998<A NAME="1998"></a>
    > </td>
    > </tr>
    > <tr>
    > <td class="bordered_text">
    > <table width="100%" class="page_text">
    > <tr>
    > <th style="width:100px">Event Date</th><th>Event Name</th>
    > </tr>
    > <tr>
    > <td>December 13</td>
    > <td><a href="fbt98res.htm" >Insight Fiesta Bowl 10K</a>
    > </td>
    > </tr>
    > </table>
    > [etc.]
    > </tr>
    >
    > The new reference finds the new file (that's now in /results/), but
    > this modified file has some boilerplate "include" links that don't work
    > now because they're based off the directory root, not the lower
    > "results" directory where this file now resides (e.g.):
    >
    > <? include "include/page_top.php"; ?>
    >
    > My question is: how do I modify the "include" statements to reference
    > the root directory? (I know this is a remedial query, but my experience
    > is only with DOS and Windows file organizations, not what exists on my
    > Web site.) 8<{{ Please advise TIA
    >


    Some programs, such as Dreamweaver, will keep track of file locations
    and adjust all file references accordingly. Not sure with a complex
    situation like yours, whether it would be 100% reliable and it is a bit
    like closing the door after the horse has bolted, but maybe there are
    others that would have done the same. However, this would require you to
    make sure everything was in its original location before referencing it
    with the required software and then using the software to move things
    around.

    --
    Pete Ives
    Remove All_stRESS before sending me an email
    Peter, Jan 9, 2012
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mike kim
    Replies:
    2
    Views:
    525
    clintonG
    Aug 20, 2003
  2. Tiddley-Pom
    Replies:
    5
    Views:
    426
    Mark Parnell
    Oct 15, 2003
  3. mark4asp
    Replies:
    1
    Views:
    1,133
    Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
    Mar 24, 2007
  4. Ketchup
    Replies:
    1
    Views:
    246
    Jan Tielens
    May 25, 2004
  5. Replies:
    3
    Views:
    97
    CHIN Dihedral
    May 6, 2014
Loading...

Share This Page