我们只是在动机托管上购买新的专用服务器
所以当我尝试部署基于Symfony 4的项目时
我得到这个错误
Notice: SessionHandler::gc(): ps_files_cleanup_dir: opendir(/var/cpanel/php/sessions/ea-php72) failed: Permission denied (13)
我已经在StackOverflow上搜索了相同的问题,但对我没有帮助
我需要在服务中抛出一个Exception
$isLangExist = $this->em->getRepository('TranslationBundle:Language')->findOneBy(array(
'locale' => $this->request->getMasterRequest()->getLocale()
));
if (!$isLangExist) {
throw new createNotFoundException('you are using unavailable langage');
}
Run Code Online (Sandbox Code Playgroud)
但我得到的这个页面并不是prod env中的workinc
如何使用createNotFoundException或任何其他Exception类型显示404页面
谢谢