在codeigniter中,我收到此消息:
Unable to load the requested file: home.php
控制器:
cp/
Login
观点:
cp/
home.blade.php
地址:
http://www.vitrinsaz1.ir/Mobile/Vitrinsaz/Pannel/cp/login
routes
:
$route['default_controller'] = 'index';
$route['pages/(:any)'] = "page/get/$1";
$controllers = array('bank','baseController','contact','cron','faq','inbox','index','livescore',
'msg','news','odds','page','profile','poll','rss','setting','traction','user' ,'shop' , 'product' , 'ad' ,
'comment','home','login');
foreach($controllers as $controller) {
$route[$controller] = $controller."/index";
$route[$controller."/(:any)"] = $controller."/$1";
}
答案 0 :(得分:3)
作为您的文件夹结构,home.php
内的View/cp/
。
所以在你的代码中这应该是
$this->load->view('home','');
更改为
$this->load->view('cp/home',''); # or cp/home.blade
答案 1 :(得分:0)
您正在尝试加载“家庭”,但您查看的文件名为“home.blade'并且在文件夹“cp'”中,因此您需要加载“cp / home.blade”。
$this->load->view('cp/home.blade')