컨트롤러 constructori
에 생성자와 메서드 aas
이 있습니다. 나는 새 개체 $col = new constructori()
를 생성하고, 그 후 나는 방법에게 전화 echo $col->aas();
Codeigniter의 생성자
Class Constructori {
function index(){
}
public function __construct(){
echo" something <br />";
}
function aas(){
echo 'another something <br>';
}
}
$col = new Constructori();
echo $col->aas();
내가 갖는 이유
사람이 설명 할 수 :
something
another something
something
대신
something
something
another something
내가 프레임 워크 (CI)가 이미 컨트롤러를 인스턴스화되어 가정합니다. –
나는 알고있다. 출력은'''s, s, a''라고 기대할 것이다. 출력의 두 번째와 세 번째 라인은 나를 혼란스럽게합니다. – Napster33