I am getting Class 'index' not found in Eval() code.
//write config
$path = dirname(__FILE__).DS.'..'.DS.'paymentclass';
if ( $model->payment_class ) {
if (include_once($path.DS.$model->payment_class )) {
eval( "\$_PAYMENT = new ".str_replace('.php', '', $model->payment_class)."();");
}
}else {
include( $path."pcl_payment.php" );
$_PAYMENT = new pcl_payment();
}
$_PAYMENT->write_configuration();
//end write
Why??????
Class not found error
Moderator: General Moderators
- AbraCadaver
- DevNet Master
- Posts: 2572
- Joined: Mon Feb 24, 2003 10:12 am
- Location: The Republic of Texas
- Contact:
Re: Class not found error
Two possibilities:
1. There is no Class index in $path.DS.$model->payment_class
2. The path is wrong and you've run an include_once on this file already
E_ALL error reporting will show you if it is #2. If not, then it is #1.
1. There is no Class index in $path.DS.$model->payment_class
2. The path is wrong and you've run an include_once on this file already
E_ALL error reporting will show you if it is #2. If not, then it is #1.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.