| 
 Posted by Tony Mays on 08/01/05 06:50 
JohnJay wrote: 
 
> Hi, 
>  
use  
 
require_once("...") 
 
>      I have a problem.  I've got a base class for which two classes spawn 
> off (in diff files): 
>  
> base->class1 
>        ->class2 
>  
>     The problem I have is if class1 and class2 are used in the same file: 
>  
>     require "class1.php" 
>     require "class2.php" 
>  
>     If I include the line "require 'class2.php'", I get the following: 
>  
>  
> Fatal error: Cannot redeclare class base in test.php on line 13 
>  
> I've got the following defns: 
>  
> abstract class base 
> { 
> } 
>  
> require "base.php" 
> class class[1/2] extends base 
> { 
> } 
>  
> What's the soln?  Thx
 
  
Navigation:
[Reply to this message] 
 |