Re: [PEPr] Comment on Images::GraPHPite

From: Date: Wed, 01 Sep 2004 13:47:28 +0000
Subject: Re: [PEPr] Comment on Images::GraPHPite
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-33146@lists.php.net to get a copy of this message
Lukas Smith wrote:
Alan Knowles wrote:
As regards to named_colors.txt - shouldn't it be placed in the data folder?
It's a bit vauge here - I've never really used the data directory, for something like this, it adds unnecessary complexity, for things like .js or .html files that are need indirectly for a package, it makes sense (as you probably need to stick your data dir somewhere available to apache), but something that is tied in intrisically it's a bit messy to try and find out where the file is, then parse it.
we also defined a misc dir a while back .. dunno if that is even handled by the installer though
Nope. Finding the data stuff isn't difficult, use a replacement. <file name="named_colors.txt" role="data"/> <file name="filethatusesit.php" role="php> <replace from="@data-dir@" to="data_dir" type="pear-config"/> </file> and in filethatusesit.php, <?php // ... $namedcolorslocation = '@data-dir@/named_colors.txt'; $fp = fopen($namedcolorslocation); ?> and so on. Greg

« previous php.pear.dev (#33146) next »