[phpa] Re: class not found

  • From: "Nick Lindridge" <nick@xxxxxxxxxxxxxxxxxxxxx>
  • To: phpa@xxxxxxxxxxxxx
  • Date: Mon, 1 Apr 2002 19:23:06 +0100 (BST)


> 
> $className = $HTTP_ALL_VARS['className'];
> $slave = new ComponentManager();
> $newComponent = $slave->createComponentByName($className, ...);
> 
> With PHPA enabled, the ComponentManager::createComponentByName() method
> is complaining that it cannot instantiate unknown class of whatever
> type I want to add.  The method is really simple:
> 
> function createComponentByName($className, ...)
> {
>   include_once("lib/Component/class.$className.php");
>   $c = new $className();
>   // do some stuff to $c
>   return $c;
> }

Can you send a small self-contained example that reproduces what you found.


------------------------------------------------------------------------
  www.php-accelerator.co.uk           Home of the free PHP Accelerator

To post, send email to phpa@xxxxxxxxxxxxx
To unsubscribe, email phpa-request@xxxxxxxxxxxxx with subject unsubscribe


Other related posts: