我正在尝试在phpfog上部署一个网站,除了我的后端之外一切正常。我相信它可能与我的restful控制器有关(public $ restful = true;)因为显示错误的唯一视图 - > (视图[partials.adminHeader]不存在)与使用restful控制器相对应。花了几个小时试图排除故障,无法想出解决方案!
//完全错误
消息:
查看[partials.adminHeader]不存在。 位置:
第156行的/var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/view.php 堆栈跟踪:
#0 /var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/view.php(93):Laravel \ View-> path('partials.adminH ...') #1 /var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/view.php(204):Laravel \ View-> __ construct('partials.adminH ...',Array) #2 /var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/helpers.php(526):Laravel \ View :: make('partials.adminH ...',Array) #3 /var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/view.php(359):eval()'d code(1):view('partials.adminH ...') #4 /var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/view.php(359):eval() #5 /var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/blade.php(71):Laravel \ View-> get() #6 [内部函数]:Laravel {closure}(Object(Laravel \ View)) #7 /var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/event.php(199):call_user_func_array(Object(Closure),Array) #8 /var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/event.php(138):Laravel \ Event :: fire('laravel.view.en ...',Array,true) #9 /var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/view.php(330):Laravel \ Event :: until('laravel.view.en ...',Array) #10 /var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/view.php(408):Laravel \ View-> render() #11 /var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/view.php(345):Laravel \ View-> data() #12 /var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/blade.php(71):Laravel \ View-> get() #13 [内部函数]:Laravel {closure}(Object(Laravel \ View)) #14 /var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/event.php(199):call_user_func_array(Object(Closure),Array) #15 /var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/event.php(138):Laravel \ Event :: fire('laravel.view.en ...',Array,true) #16 /var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/view.php(330):Laravel \ Event :: until('laravel.view.en ...',Array) #17 /var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/view.php(551):Laravel \ View-> render() #18 /var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/response.php(246):Laravel \ View-> __ toString() #19 /var/fog/apps/app58421/shipwatch.phpfogapp.com/laravel/laravel.php(178):Laravel \ Response-> render() #20 /var/fog/apps/app58421/shipwatch.phpfogapp.com/public/index.php(34):require('/ var / fog / apps / a ...') #21 {main}
答案 0 :(得分:2)
我遇到了同样的问题,chmod你的存储文件夹。 chmod -R 755
答案 1 :(得分:1)
如果直接在get()方法中呈现某些内容会发生什么
像
class DemoPage_Controller
{
public function getPosts()
{
echo 'Direct outputting';
return;
//return View::make('demopagetemplate');
}
}
如果上面仍然有效,请确保在Apache上启用了mod_rewrite(你可以使用phpinfo()来实现这个)