Hi all,
I've got a rather frustrating problem trying to include class-files. I've written a function to include a file containing a class-definition, so that i can easily include a class wherever i need to in my code. The function looks like this:
function include_class($classname)
{
global $config;
$filename = $config[path_shop].$config[path_classes] . $classname . ".class.php";
require($filename);
}
The $config-variables are set properly and the file is actually included without error. My problem is that the class I wanted to include is now listed as __PHP_INCOMPLETE_CLASS (when I call the get_declared_classes() function).
So, I can't instantiate any objects of my class, i just get the error-message that the class doesn't exist.
I've searched this and other forums about the problem, but it all had to do wit unserializing classes or storing objects in sessions which I didn't.
I'd be very grateful for any helpful comments. Thank you,
Tom