随意参考,类的研究我也在进行a.class.phpclass a{ private $test; function __destruct(){ } public function set($str){ $this->test=$str; } public function show(){ echo $this->test; } } //========= b.class.phprequire_once( 'a.class.php');class b extends a{ function modify($Ok){ parent::set($Ok); } }//===============$test=new b(); $test->modify('aaaa'); $test->show();
在b里include C文件还是在A里一起include?
private $test;
function __destruct(){ }
public function set($str){
$this->test=$str; }
public function show(){
echo $this->test;
}
}
//=========
b.class.phprequire_once( 'a.class.php');class b extends a{
function modify($Ok){
parent::set($Ok);
}
}//===============$test=new b();
$test->modify('aaaa');
$test->show();
你都把关系定死了(A要B,B要C),别人能怎么做?
————————————————————————————————
基于CSDN论坛提供的插件扩展功能,自己做了个签名档工具,分享给大家,欢迎技术交流 :)