[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: PHP application packaging policy/best practice?



Le Mer 12 Janvier 2005 01:31, Matthew Palmer a écrit :
> So you patch libfile2.php to require_once 'mylib/libfile1.php'
> instead of just 'libfile1.php'.

oh and btw, the suggestion I did is better (IMHO) :

replace require_once 'libfile.php'; with

require dirname(__FILE__).'/'.'libfile1.php';

because you are robust to _any_ mess done by the user with the 
include_path (for a zero cost). You even not assume that /usr/share/php 
is in the include_path.
-- 
·O·  Pierre Habouzit
··O
OOO                                                http://www.madism.org

Attachment: pgp8Twz1DJ1U4.pgp
Description: PGP signature


Reply to: