|
自定义一个类(system/application/Myclass.php):
class Myclass{
function Myclass($file,$ext){
....
}
}
然后在某个Controller里调用:
$this->load->library('myclass');
$this->myclass->myclass('a','b');
可是却提示:
A PHP Error was encountered
Severity: Warning
Message: Missing argument 1 for Down:own(), called in C:\xampp\htdocs\rmbweb\rmbweb\system\libraries\Loader.php on line 931 and
defined
Filename: libraries/Down.php
Line Number: 3
但是,奇怪的问题出现了:当把Myclass类中的构造函数去掉,而直接:
class Myclass{
function hello($file,$ext){
....
}
}
然后调用:
$this->load->library('myclass');
$this->myclass->hello('a','b');
却没有出现错误。
请问这是怎么回事呢? |
|