| 
 Posted by gosha bine on 08/29/07 08:06 
On 29.08.2007 03:09 Phil Latio wrote: 
>> I just put in the include statements. 
>> 
>> Actually, I don't use include - I use require_once.  And if a class  
>> depends on another class (often in my case), the require_once goes in the  
>> requiring file. 
>  
> This is what I doing now. I am just getting fed up with it. 
 
how about 
 
foreach(glob("lib/*.php") as $file) require_once($file) 
 
 
>  
>> __autoload is good - but it requires extra processing over and above a  
>> require_once, and pretty much everything has to reside in the same  
>> directory. 
>  
> I had heard of __autoload before but never realised what it did. I did a  
> Google after getting the other reply and came across  
> http://tobias-demuth.de/en/index.htm which looks interesting. Bit  
> frustrating that the author hasn't included some examples and a bit more  
> documentation because I don't fully understand how it supposed to work. 
>  
 
autoload is rather a dirty hack and as such should be avoided. 
 
--  
gosha bine 
 
makrell ~ http://www.tagarga.com/blok/makrell 
php done right ;) http://code.google.com/p/pihipi
 
[Back to original message] 
 |