|
PHP复制代码
- <?php
[*]class BlogPost extends CI_Controller
[*]{
[*] public function createPost() {
[*] if (!Authentication::checkAuthentication()) {
[*] // redirect to login
[*] }
[*] else {
[*] // proceed
[*] Messages::notifyAdmin();
[*] }
[*] }
[/list]
复制代码
CI中怎么在一个控制器中调用另外一个控制器的函数,请问这里的Authentication 和 Messages 就是其他控制器。但是我这样测试了一下会出错。
|
-
console
|