Class Load twice

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

 



hi!

Please take look at my code;
I have two files.
one of the two file is wrtten mail() function.
when load.php is loaded, mail(), written by MyClass.php,
os also loaded.
I just do not want to load mail() when load.php is load.
if you know how to solove it, please teach me it!

*********MyClass.php***********
<?php
$objRef=new MyClass("hui7gutWSFrh6zt");
$objRef->buff();
mail("aaa@xxxxxxxxxxx","test","test");
class MyClass{
	 Private $google;
	 function __construct($googleKEY){
		$this->google=$googleKEY;
	}
	public function buff(){
		echo $this->google;
	}
}

?>

*********MyClass.php***********
<?php
function __autoload($class_name) {
    include_once $class_name . '.php';
}
$obj = new MyClass();
?>



Regards,
Yui

-- 
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