Reply to Class Redefinition Error

Your name:

Reply:


Posted by JohnJay on 08/01/05 05:16

Hi,

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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация