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 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -