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

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

java - where to store the user credentials in an enterprise application(EAI)? -

openxml - Programmatically format a date in an excel sheet using Office Open Xml SDK -