ci类库怎么继承类库?
两个类库都是自定义的类库在 ./application/libraries下新建了两个文件Father.php Son.php
然后让 son 继承father我先上代码:
Father.php代码:
<?php
class Father{
public function edit(){
echo 'father/edit';
}
}
?>
Son.php
<?php
class Son extends Father{
public function index() {
echo 'son/index';
}
}
?>
这样写继承,在调用的时候会出错。
我应该怎么写?
为什么要类库继承? 你怎么调用的?
页:
[1]