Re: PEAR::DB_DataObject Overload-ERRMSG

From: Date: Thu, 24 Jun 2004 00:27:18 +0000
Subject: Re: PEAR::DB_DataObject Overload-ERRMSG
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-13294@lists.php.net to get a copy of this message
In index.php I required all PEAR-Packages that I need require_once('pear/DB.php'); require_once('pear/DB/DataObject.php'); require_once('pear/DB/DataObject/FormBuilder.php'); require_once('pear/DB/QueryTool.php'); require_once('pear/HTML/quickform.php'); require_once('pear/HTML/TreeMenu.php');
It's far better to do: ini_set('include_path', dirname(__FILE__).PATH_SEPERATOR. dirname(__FILE__).'/pear'.PATH_SEPERATOR ); ** this ensures that a) pear's paths work b) you only make available the pear packages versions that you know work c) changes to the installed system's pear code will not affect you.. then require_once('DB.php'); require_once('DB/DataObject.php'); require_once('DB/DataObject/FormBuilder.php'); require_once('DB/QueryTool.php'); require_once('HTML/quickform.php'); require_once('HTML/TreeMenu.php'); you cant mess around with the paths for pear - all the packages depend internally on the fact that it works like this. Regards Alan

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