Class not found error


Posted on 16th Feb 2014 07:03 pm by admin

I am getting Class 'index' not found in Eval function:

//write config

Did you know?Explore Trending and Topic pages for more stories like this.
$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???
No comments posted yet

Your Answer:

Login to answer
214 Like 54 Dislike
Previous forums Next forums
Other forums

Procedural to OOP
John Kleijn said that to avoid writing "crappy code", we should learn OOP and common OO pr

extract content from a website
i have written a code that will grab the content from the index page..
i would like to know how c

PHP hyperlinks generator
Hi

I need some help to get this done using php:


1 - I have few hyperlinks say 500

Kill a process
I have a question - how can I kill a process from a command line or by using Oracle SQL Developer? I

Upload simple problem
Really confused!! I run once and it worked, but when i tried today...it didn't work

Which par

php problem?
I don't think I'm stupid, but maybe I am.

I am working on a sit for a friend I am try to put

PHP Thumbnail Creation
Ok so i use this function to create thumbnails:

Code: [Select]function createthumb($name,$fil

switch not getting value
what am i doing wrong?
i want to populate the country list according to the category
i want to

Drawing Images in classes
I'm quite new to Object Oriented PHP. What I'm trying to do is draw some images but also have other

Need help to modify php ELSE code
I'm trying to find a way to have the php code display a message if there is no inventory listed in t

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash