Home »
Imported messages »
comp.lang.php »
Using server to list CSS page list in menu
Re: Using server to list CSS page list in menu [message #172049 is a reply to message #172039] |
Fri, 28 January 2011 14:41 |
Jerry Stuckle
Messages: 2598 Registered: September 2010
Karma:
|
Senior Member |
|
|
On 1/28/2011 12:14 AM, drum118 wrote:
> Below is a scrip I use for menu on various sections of my site that
> started out being one thing and now is something different.
>
> At this time I have over 500 variations of this scrip as each of them
> have different years as well some have less pages while others have
> more. The section names always changes.
>
> I am new to PHP as this would cut down on changing each page when I
> add more pages to a section or that section has more years added than
> plan.
>
> I want to do one page of code for each different menu and put it on
> the server to changes all the efected pages. A section call Toronto/
> Women'sCollege can be Mississuga/AbsoluteWorld or Transit/Hamilton and
> so on.
>
> I know I am looking at over a 1,000 different types of combination of
> menus and will climb over time.
>
> If I write page code call Women'sCollege.txt the following code would
> show up on thar text file.That file would be place in a folder call
> call menu or Torontomenu on the server.
>
> On the web pages is where I am not sure how to do the code and it
> could be something like this:
> <?php include("./menu/Women'sCollege.txt"); ?> or<?php include("./
> urbanToronto/Women'sCollege.txt"); ?> or<?php include("./transit/
> MississaugaTransit.txt"); ?> depending if it's an urban site or a
> transit site.
>
> I am not sure where to put the folder and the text files and it has
> been years since I did anything with the cgi and have forgot most of
> it.
>
It really doesn't matter where you put them, as long as they are in a
directory accessible to your web server. Use $_SERVER['DOCUMENT_ROOT']
to identify the absolute path to the server root directory then a
relative path to your menu based off of that.
But you don't necessarily need PHP for this - SSI (Server Side Includes)
can include files, also. And are you sure you're using cgi? Most
hosting companies run PHP as a module.
<completely irrelevant html and javascript snipped>
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
|
|
|
Goto Forum:
Current Time: Wed Nov 27 04:48:09 GMT 2024
Total time taken to generate the page: 0.05517 seconds