(un)require file
Posted: Thu Jun 19, 2003 3:35 am
I have 3 files:
//---file1.php----
function func1() {
echo "1";
}
//---file2.php----
function func1() { //the func name is the same like func name in file1.php
echo "2";
}
//---file3.php----
require "file1.php";
func1(); //it will write '1'
now I want to require "file2.php" and when the code again reaches to the func1(), it have to write '2'
so is there any unrequire function to remove file1.php include?
or some method for dynamic function deleting?
thx.
//---file1.php----
function func1() {
echo "1";
}
//---file2.php----
function func1() { //the func name is the same like func name in file1.php
echo "2";
}
//---file3.php----
require "file1.php";
func1(); //it will write '1'
now I want to require "file2.php" and when the code again reaches to the func1(), it have to write '2'
so is there any unrequire function to remove file1.php include?
or some method for dynamic function deleting?
thx.