Posted by Gunnar G on 02/06/07 09:55
Kimmo Laine wrote:
> "Gunnar G" <debian@comhem.se> wrote in message
> news:LmXxh.31301$E02.12903@newsb.telia.net...
>> ... but moving the include line to this
>>
>> class a
>> {
>> include("page.php");
>> function foo($x){return $x+1;}
>> }
>>
>> class b
>> {
>> function foo($x){return $x+1;}
>> }
>>
>> and it no longer works.
>
>
> I'm guessing page.php defines another function named foo. In this case,
> just take the extra foo from class a and throw it out the window. If you
> include it from page.php, you don't need top redefine it... doi!
Well, in this case page.php had only 6 characters in it
<?php ?>
so there should'nt be any problem.Very strange.
Navigation:
[Reply to this message]
|