Hey there i noticed sometinh quite odd when trying to include a class
definition:

There are several classes in the project in question.
Every class resides i a separate file that gets included.

When i call the following method

 function mRenderPrintNav($client) {
  show_var("",get_declared_classes());//debugcode

include($this->pApp->pPath."/".$this->pApp->pCommonPath."/layernav.cls.php");
//include the class definition
  $menu=new Menu;
  $this->mRenderNavWalk($client,&$menu);
  $menu->printMenu();
 }

PHP complains

Fatal error: Cannot redeclare class menu in ..//_common/layernav.cls.php
on line 3

ok i started checking if i include the file twice, ich wrote some chars
before the first <?
in the class file, and i see the chars once, but not twicw.
There is no other class called menu in the same project.

So i checked the defined classes with PHP's get_declared_classes().

if i check the declared classes *before* the include it says that the
class Menu is defined.
if i uncomment the include (it is called after get_declared_classes())
the class is not defined at all.

weird.i dont get it.
maybe you do

thank you guys
Jens

--
Grüße aus dem schönen Kleve
Jens Kisters

rosomm et partner
Agentur für neue Medien GmbH
Dienstleistungszentrum am
Weißen Tor - Eingang B
Gocher Landstrasse 2
47551 Kleve / Bedburg-Hau

Telefon: 02821 - 97856-20
Telefax: 02821 - 97856-77
[EMAIL PROTECTED]
http://www.rosomm-partner.de



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to