Here is the thing,
I read about the __autoload magic function and wanted to know if in this function there would be a way to know if what it tries to __autoload is a class, an interface, a function (even though I think it's not called upon an unfound function)...
Each of these in my implementation are found in different paths, so to require them I would need to have access to this information...
Thank You
How to __autoload classes, interfaces, functions
Moderator: General Moderators
-
ctrLogicDotNet
- Forum Newbie
- Posts: 24
- Joined: Fri Jul 24, 2009 10:52 am
Re: How to __autoload classes, interfaces, functions
It doesn't matter, simply check both paths in the __autoload function:
Code: Select all
if (file_exists($file_path_a))
{
require_once($file_path_a);
}
elseif (file_exists($file_path_b))
{
require_once($file_path_b);
}