Claudio wrote:
Hi,
I'm using PHP 5. I have a class operation that includes php files.
Is there a way to include this files to global scope? So that difined vars
and functions are global accesseble?
first off I would recommend that you 'pollute' your global scope as little as
possible.
secondly could you describe what you are trying to do and why exactly -
stuff like this has been solved before but its hard to recommend a strategy when
one doesn't know what the underlying idea/direction is ....
that said the solution will probably involve the use of the 'global'
keyword.
I saw that some PHP functions have a context parameter, is something like
this in "eval" or "include" possible?
I think you mean then 'context' param related to functions that work with
streams - this is not AFAIK related to [variable] 'scope'.
also eval() sucks (unless there is no other way to do something, in which case
its lovely ;-).
Thanks,
Claudio
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php