Re: need help structuring portable directory structure
| From: | Mark Wiesemann | Date: | Wed, 13 Jun 2007 19:32:13 +0000 |
| Subject: | Re: need help structuring portable directory structure | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-27470@lists.php.net to get a copy of this message | ||
l Burnerheimerton wrote:
> Inherited a web site where the Pear packages are
> "self-included":
>
> /adm
> /adm/spreadsheet_call_call.php
> /inc
> /inc/Pear.php
It's PEAR.php, not Pear.php.
> /inc/QuickForm.php
> /inc/QuickForm/...(all quickform directories)
>
> And the following is included at the top of
> /inc/QuickForm.php
>
> ini_set('include_path','.;..');
That's a bad idea. Don't edit PEAR files. Upgrading will be impossible
or cause you a lot of work.
> Quickform works through the site by referencing:
> require_once '../inc/QuickForm.php';
>
> I want to add spreadsheet/writer to the mix. I added:
> /inc/Writer.php
Writer.php belongs into /inc/Spreadsheet/Excel/.
Why don't you just use the standard PEAR directory layout (for QF it's
already right, but it's wrong for the Excel package)?
Just add the inc/ directory to your include_path (either in php.ini,
httpd.conf, .htaccess, on top of *your* scripts, or in a common prepend
file) and you're done.
Regards,
Mark
--
http://www.markwiesemann.eu