Hi there

Have you tried putting this into your '.htaccess' for each hierarchy, so that it
will use a different 'master.inc' for each hierarchy ?

Then you could divide the master.inc into three master.incs that could include
the files they needed for each of the sections.


.htaccess

------

php_value include_path '.:/path/to/section1'

------




On Wed, 19 Dec 2001, Martin Hughes wrote:

> Heya,
>
> OK - I have a site I've been working on on and off for a while. It started
> as a static page, then I changed it so it uses php. This was great - until I
> started putting content in the design. I now have about 300 *.inc files for
> the site, and updating them is a joke!
>
> The site is designed in a heirachical way:
>
> Top
>   Section 1
>     id 1
>     id 2
>     id 3
>     id 4
>   Section 2
>     id 1
>     id 2
>     id 3
>   Section 3
>     id 1
>     id 2
>     id 3
>     id 4
> etc...
>
> I'm using 1 file for the code - index.php?sect=XX&id=XX and the nav menus
> are dynamically generated and populated on the page along with the content
> which is filled by an inc file in directory: root/php/"sectname"/"id".inc
> where "sectname" is the name of a section defined in an array in index.php
> (eg, section 6 is "synthesizers"). The images and headings on the page are
> also dynamically generated (images have a number eg "2.jpg" for the heading
> of section 2 etc.)
>
> In sections 6 though, ids 2-6 are based on one template, so i have 5 files:
> 2.inc, 3.inc, ... 6.inc all exactle the same, just containing <?
> require_once('php/synthesizers/template.inc') ?>
> This seems somewhat stupid.
>
> Oer X-Mas & New Year, I want to entirely recodethe site so it is more "user
> friendly" for me to maintain. I am slowly getting better and better at php
> so it should be good.
>
> Does ANYONE have any pointers as to how to start and do this thing. Any
> ideas for how my site should be layed out (directory-wise etc - is it easier
> to have 1 directory per section and hold everything in it - images included,
> or is it best to have a separate img/ directory??).
>
> many thanks all - Seasons greets!!
>
> Martin
>
>
>
>

-- 
Knut
------
Knut H. Hassel Nielsen, [EMAIL PROTECTED]
Principal Engineer, Office : ITS 204
IDI NTNU, Sem Saelands vei 7-9
N-7491 Trondheim, Norway
Phone (+47) 73 59 18 46 Fax (+47) 73 59 60 35

"If debugging is the process of removing bugs, then programming
 must be the process of putting them in. -Dykstra"


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to