Colgate Shu Colgate Shu - 1 month ago 27
PHP Question

how Symfony2 cache my file app_dev.php

Step 1.there is no "phpinfo();" in my app_dev.php, view the web is OK!(no phpinfo)

Step 2.and i type "phpinfo();" in app_dev.php, view the web, but it's still no phpinfo, and no effect, and i still refresh the web, about few minutes (maybe many times refreshing), it's work, (yes phpinfo is showing in the web)

this my code:

...
phpinfo();
$loader = require __DIR__.'/../app/autoload.php';
Debug::enable();

$kernel = new AppKernel('dev', true);
//$kernel->loadClassCache();
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);


So. Why? I'm confused. Anyone can help me ? THX

Answer

In my case - your code is working. I think its not a symfony issue. But at all you can run phpinfo with default symfony profile toolbar. Look at here: enter image description here