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

forms - Secure PHP File Upload Script -

java - How do I override the spring framework version in Spring Batch? -

.net - Amazon EC2 API and Windows instances - any way to get drive letter assignment? -