我正试图在phpfog上部署一个站点,除了我的后端之外,其他一切都很好。我相信这可能与我的restful控制器有关(public$restful=true;),因为只有显示错误->(View[partials.adminHeader]不存在)的视图与使用restful控制器相对应。花了几个小时试图解决这个问题,却找不到解决方案!
//全错误
消息:
视图[partials.adminHeader]不存在。位置:
/第156行的var/fog/app/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/app/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/app/app58421/shipwatch.phpfogapp.com/laravel/view.php(359):eval()#5/var/fog/app/app58421/shipwatch.phpfogapp.com/laravel/blade.php(71):laravel\View->get()#6〔内部函数〕:Laravel{闭包}(Object(Laravel\View))#7/var/fog/app/app58421/shipwatch.phpfogapp.com/laravel/event.php(199):call_user_func_array(Object(Closure),array)#8/var/fog/app/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):Laraver\Event::until('laravel.view.en…',Array)#10/var/fog/app/app58421/shipwatch.phpfogapp.com/laravel/view.php(408):laravel\view->render()#11/var/fog/app/app58421/shipwatch.phpfogapp.com/laravel/view.php(345):laravel\view->data()#12/var/fog/app/app58421/shipwatch.phpfogapp.com/laravel/blade.php(71):laravel\View->get()#13〔内部函数〕:Laravel{闭包}(Object(Laravel\View))#14/var/fog/app/app58421/shipwatch.phpfogapp.com/laravel/event.php(199):call_user_func_array(Object(Closure),array)#15/var/fog/app/app58421/shipwatch.phpfogapp.com/laravel/event.php(138):laravel\event::fire('laravel.view.en…',Array,true)#16/var/fog/app/app58421/shipwatch.phpfogapp.com/laravel/view.php(330):Laraver\Event::until('laravel.view.en…',Array)#17/var/fog/app/app58421/shipwatch.phpfogapp.com/laravel/view.php(551):laravel\view->render()#18/var/fog/app/app58421/shipwatch.phpfogapp.com/laravel/response.php(246):laravel\View->__toString()#19/var/fog/app/app58421/shipwatch.phpfogapp.com/laravel/laravel.php(178):laravel\Response->render()#20/var/fog/app/app58421/shipwatch.phpfogapp.com/public/index.php(34):require('/var/fog/apps/a…')#21{main}
我遇到了同样的问题,也修改了存储文件夹。chmod-R 755
如果直接在get()方法中呈现一些内容会发生什么
像
class DemoPage_Controller
{
public function getPosts()
{
echo 'Direct outputting';
return;
//return View::make('demopagetemplate');
}
}
如果以上仍然无效,请确保您在Apache上启用了mod_rewrite(您可以使用phpinfo()来chk this)