CoreyR Posted June 22, 2007 Share Posted June 22, 2007 So I have four PHP files that call a fifth file which contains the following: class xml_story {var $title, $description, $propertyname;} When I run php-e trigger.php the trigger file calls four different php files which all use the code above as a resource. PLEASE HELP! Corey R. Link to comment https://forums.phpfreaks.com/topic/56640-solved-php-fatal-error-cannot-redeclare-class/ Share on other sites More sharing options...
teng84 Posted June 22, 2007 Share Posted June 22, 2007 class xml_story {var $title, $description, $propertyname;} are you trying to use a class ^^^^ or declaring a class Link to comment https://forums.phpfreaks.com/topic/56640-solved-php-fatal-error-cannot-redeclare-class/#findComment-279728 Share on other sites More sharing options...
CoreyR Posted June 22, 2007 Author Share Posted June 22, 2007 I was classing the class in all four files. After I revisited the php, I fixed it by adding this to my trigger. Thanks for taking a look, I appreciate it. <?php include ('call_class.php'); ?> Link to comment https://forums.phpfreaks.com/topic/56640-solved-php-fatal-error-cannot-redeclare-class/#findComment-279731 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.