I initialize class objects something like this and it works.
$obj = new Model_Person_DbTable();
But开发者_如何学Go when do it like this:
$className = 'Model_Person_DbTable()';
$obj = new $className;
Then it show following fatal error:
Model_Person_DbTable() class not found.
How can I achieve this in PHP/Zend
Try without the brackets (they are not part of the class name)
$className = 'Model_Person_DbTable';
If that doesnt help, make sure your autoloader and include path is set up correctly.
精彩评论