<?php
namespace Admin\Controller;
use Common\Controller;
class ArticleController extends CommonController {
public function _initialize(){
parent::_initialize();
}
function xiehuigonggao(){
R('Article/inidex',array('index'));
}
//此处没有 index的操作,是继承Common中的index
问题来了,打开Article/xiehuigonggao是空的哦!!!"NetworkError: 404 Not Found - http://localhost/XXXXXX/index.php?m=Admin&c=Article&a=xiehuigonggao"
我的R方法哪里用错了呢?把CommonController的代码也贴上
<?php
namespace Common\Controller;
use Think\Controller;
class CommonController extends Controller {
public function index($html='') {
......
$this->display($html);
}
最佳答案
