出现Unable to load the requested file: .php
是什么原因呢?URI为:。../index.php/show/index/130
contraller代码为:
class Show extends QT_Controller {
function __construct(){
parent::__construct();
}
function index($id){
$query = $this->db->query('SELECT * FROM articles a left join product b on a.prod_id = b.id where a.prod_id='.$id);
$detail = $query->row_array(); // 内容信息
$data['detail'] = $detail;
$data['title'] = $detail['title']. '_' .site('name');
$data['photos'] = explode("||", $detail['photos']);
$this->load->view($detail['tpl_show'], $data);
}
}
QT_Controller 是什么?从 CI_Controller 继承的? 回复 2# Hex
我的访问方法出错了么?
感觉没有啊~~
/**
* 前台父控制器
*
* 前台的所有控制器都需要继承这个类,
*
* @author onice
*/
class QT_Controller extends Controller {
protected function __construct() {
parent::Controller();
/** 前台页面均使用主题皮肤功能 */
$this->load->switch_theme_on();
$this->load->helper('site');
}
QT控制器,前台控制器 你这个不是 2.0 吧?
90%是你的命名有问题,你把你的项目打包发上来看看。 ->switch_theme_on()
这个的配置出问题了把 回复 4# Hex
.恩,好的。
还有个问题就是我在自己的电脑的时候修改config以后添加.htaccess,去掉index.php 没有问题
但是换个电脑以后却不行了,不知道怎么回事。。。。
我也是有这个问题!~
页:
[1]