Re: Is there a way to un include a file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 
classes AFAIK).  

Include files are libraries.  They are not functions.  What you're looking for 
is a function.  Don't try to use include files as functions.  Therein lies 
pain.  

On Thursday 08 March 2007 12:18 am, jekillen wrote:
> 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 variables but may have different values for variables
> or different versions of the same function.
> If there is not a specific function for un including a file (I have not
> seen any indication from my text books that there is), it seems like
> it would be nice to have one.
> Meanwhile I will be doing some experimentation.
> Thanks in advance;
> Jeff K

-- 
Larry Garfield			AIM: LOLG42
larry@xxxxxxxxxxxxxxxx		ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux