Re: PEAR / include path

From: Date: Sat, 05 Oct 2002 00:10:02 +0000
Subject: Re: PEAR / include path
References: 1 2 3 4  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-2438@lists.php.net to get a copy of this message
[This followup was posted to php.pear.general and a copy was sent to the cited author.] In article <002b01c26bfd$3a3e1400$f03e4151@pabook>, paj@pearfr.org says... > It s not a recommandation, this is the way to follow. Yes, but the PEAR developers can change the folder structure to solve the problem and that is the reason why I make this suggestion. > Each module requires files relative to the PEAR root folder. I do not think, you have got the problem: Example: Lets imagine your include_path looks like this: include_path= ".;C:\PHP\A;C:\PHP\B" and unfortunatly there are two files: C:\PHP\A\module.php and C:\PHP\B\module.php So if your includepath looks like above, you have to set_ini('include_path','C:\PHP\B'); include('module.php'); to get the right module included. This is very odd!! But if your include-path looks like this: include_path= ".;C:\PHP" include('B/module.php') will be enough to refer to the right file. Let's assume, you started developing, while C:\PHP\A was not installed yet, and you used just include('module.php') your application will break, if your college adds 'C:\PHP\A' to the include_path. Or vice versa, adding PEAR to the include_path can break existing applications which are based on other libraries. This cannot be the purpose of PEAR-developers. Regards Thomas

« previous php.pear.general (#2438) next »