2
내 환경을 dev에서 prod로 변경하려고합니다. prod env가있는 잘못된 경로로 가려고 할 때 "전자 메일 us ..."와 같은 오류 페이지 대신 dev 오류 페이지 "NotFoundHttpException :"이 표시됩니다.Symfony2 Production "404"
use Symfony\Component\ClassLoader\ApcClassLoader;
use Symfony\Component\HttpFoundation\Request;
$loader = require_once __DIR__.'/../app/bootstrap.php.cache';
// Use APC for autoloading to improve performance.
// Change 'sf2' to a unique prefix in order to prevent cache key conflicts
// with other applications also using APC.
/*
$apcLoader = new ApcClassLoader('sf2', $loader);
$loader->unregister();
$apcLoader->register(true);*/
require_once __DIR__.'/../app/AppKernel.php';
require_once __DIR__.'/../app/AppCache.php';
$kernel = new AppKernel('prod', true);
$kernel->loadClassCache();
//$kernel = new AppCache($kernel);
// When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter
//Request::enableHttpMethodParameterOverride();
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
모든 아이디어를 내 app.php는
있다?
감사합니다, 아드리안 귀하의 app.php
파일이 new AppKernel('prod', true)
포함
시도 : 생산 (이 또한 표준 버전의 기본입니다) 당신은 디버그가 활성화되지 않도록하려면 당신은
false
로 설정하려는 AppKernel ('찌르다', 거짓); 캐시를 지우십시오. 그것이 도움이되는지 아닌지 확실하지 않습니다. – Cerad