php - Initialize class objects problem -
i initialize class objects , works.
$obj = new model_person_dbtable();
but when this:
$classname = 'model_person_dbtable()'; $obj = new $classname;
then show following fatal error:
model_person_dbtable() class not found.
how can achieve in php/zend
try without brackets (they not part of class name)
$classname = 'model_person_dbtable';
if doesnt help, make sure autoloader , include path set correctly.
Comments
Post a Comment