|
Posted by Oli Filth on 11/29/05 16:01
rich wrote:
> "Oli Filth" <catch@olifilth.co.uk> wrote in message
> news:1133271751.729495.183280@g47g2000cwa.googlegroups.com...
>
> >
> > If every folder/index.php is exactly the same, except the {$color,
> > $size} definitions, this is a massive waste of disk space, and an arse
> > to maintain, as you've just found.
>
> Actually, there are about 10 variables in the index.phps. I just simplified
> it for the purpose of this post. When I started this project I didn't have
> access to an SQL database. I know it's not ideal but it's what I have atm.
Even so, you could still use a single flat-file to store these sets of
10 variables, which would save you having to needlessly maintain 1000
files.
You could write a one-off script which trawls through the 1000
index.php files and creates an entry in the flat-file, run this once
and then you're done.
Of course, instead, you could write a script which automatically goes
through and updates the 1000 index.php files every tijme you want to
change what it does, but it seems a convoluted way of doing things when
the alternative is so much simpler.
--
Oli
[Back to original message]
|