Re: [PHP] Is there a way to un include a file

2007-03-12 Thread Richard Lynch
No. You could perhaps wipe out *EVERYTHING* in $_GLOBALS, which would be the included file and anything in the main file[s] that went before. If you need an environment that is that "pure" for testing or something, you can run a different PHP process on each file. Otherwise, you simply have to a

Re: [PHP] Is there a way to un include a file

2007-03-08 Thread Chris
jekillen wrote: On Mar 7, 2007, at 11:47 PM, Larry Garfield wrote: No there is not, because an included file *executes* at the time it is included and is then done. Any memory-resident objects (function/class definitions, variables, etc.) that it defies then exist until you make them un-exis

Re: [PHP] Is there a way to un include a file

2007-03-08 Thread jekillen
On Mar 7, 2007, at 11:47 PM, Larry Garfield wrote: No there is not, because an included file *executes* at the time it is included and is then done. Any memory-resident objects (function/class definitions, variables, etc.) that it defies then exist until you make them un-exist (with unset() f

Re: [PHP] Is there a way to un include a file

2007-03-07 Thread Larry Garfield
No there is not, because an included file *executes* at the time it is included and is then done. Any memory-resident objects (function/class definitions, variables, etc.) that it defies then exist until you make them un-exist (with unset() for variables or, well, you can't with functions and

Re: [PHP] Is there a way to un include a file

2007-03-07 Thread Tijnema !
AFAIK there's no function to un include a file, but i don't see a problem here, as when you include your second file, everything (all conflicting variables) will be overwritten. If you still have problems, you might want to use classes around your functions and variables. Tijnema On 3/8/07, jek

Re: [PHP] Is there a way to un include a file

2007-03-07 Thread Børge Holen
On Thursday 08 March 2007 07:18, jekillen wrote: > Hello; > Is there a way to un include a file once it has been included in a > script. You seems to want the wrong thing... I could be mistaken, but from my point of view you would NOT include the file if not apropriate at that moment. > My c

[PHP] Is there a way to un include a file

2007-03-07 Thread jekillen
Hello; Is there a way to un include a file once it has been included in a script. My concern is where two php files might be included in another php file they might have code or variables that conflict. I am thinking of including files with different names but follow the same pattern of code and