Shawn McKenzie wrote:
> Daniel Kolbo wrote:
>> Hello,
>>
>> I've cleaned up my question a bit.
>>
>> I want the included file which is called within a method of a class to
>> have the same scope as the instantiation of the class's object. That
>> is, i want a class to include a file in the calling
Daniel Kolbo wrote:
> Hello,
>
> I've cleaned up my question a bit.
>
> I want the included file which is called within a method of a class to
> have the same scope as the instantiation of the class's object. That
> is, i want a class to include a file in the calling object's scope. How
> would
Hello,
I've cleaned up my question a bit.
I want the included file which is called within a method of a class to
have the same scope as the instantiation of the class's object. That
is, i want a class to include a file in the calling object's scope. How
would one do this?
'test.php'
cinclude()
Martin Scotta wrote:
> Where is $vars? there is no $vars in your code...
>
> You can extract all the global space in the CScope method, it's quite
> simple, but less performant.
>
>
> class CScope {
>
>public $vars = 'class scope\n';
>
>function cinclude($filename) {
>
Hello,
I understand the why $vars is not in the global scope, but i was
wondering if there was a way from within the class file to include a
file in the parent's scope?
i tried ::include('vars.php'), parent::include('vars.php'), but this
breaks syntax...
Please consider the following three files
5 matches
Mail list logo