Re: include path issue

From: Date: Tue, 13 Dec 2005 10:27:01 +0000
Subject: Re: include path issue
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-40717@lists.php.net to get a copy of this message
Alan Knowles wrote:
Remove the userland file exists check - Seems like it's causing more problems than it solves...
Well looking at it, it seems to make more sense to do the fileExists() check if the include failed, since the entire purpose is to determine the proper error message (file missing or file has parse errors). This should even speed things up a bit when loading drivers. However there is another use case where I cannot do without fileExists() and that is in the loadModule() method. The problem is that some modules are backend specific and some are not: MDB2_Extended vs. MDB2_Driver_Datatype_mysql Since I do not want to make the user think about this, I check if the given file exists for once case and if it does not try the other case in order to determine what file to include and how to load the instance. I will add a parameter for the user to hint this in loadModule() if they are in the unfortunate situation of safe_mode .. regards, Lukas

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