You are here: Re: Is this even possible? « All PHP « IT news, forums, messages
Re: Is this even possible?

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация