<?php
namespace lib;
class Property_Building extends \Database_DataBoundObject
... ?>
function __autoload ($className)
{
if (!class_exists($className, false)) {
$class_file_path = strtolower(str_replace('_', DIRECTORY_SEPARATOR, $className) . '.class.php');
require($class_file_path);
}
}
$o = new Lib_Property_Building;
I get the following error: Warning: require(database\databoundobject.class.php) [function.require]: failed to open stream: No such file or directory in ...
Property_Building path is lib/property/building.class.php
Database_DataBoundObject path is lib/database/databoundobject.class.php
Is there a workaround?