1

This seems like a really simple question but, as with many things ZF2, I cannot seem to find an answer.

I am learning to use ZF2, after having developed in ZF1 for years. I am following the tutorials but finding it quite frustrating as when I have an error or bad configuration I just get a blank page - no clues, no stack trace.

In ZF1 to print errors and stack traces to screen you could add the following line in .htaccess

SetEnv APPLICATION_ENV development

and in application.ini

[development : production]
phpSettings.display_startup_errors = 1 
phpSettings.display_errors = 1
resources.frontController.params.displayExceptions = 1

How do I do this in ZF2??

I see no way to turn on a development mode?

I tried adding the following to local.php but always just get a blank page when something goes wrong and need to check the Apache2 log file to see what the problem was:

'view_manager' => array(
    'display_exceptions' => true,
    ),
4

1 に答える 1

0

(または something.local.php)に名前を変更local.phpしてみてください。debug.local.php

の自動ロードパターンによって検出されていないと思いますapplication.config.php

'config/autoload/{,*.}{global,local}.php'
于 2013-02-05T14:22:52.537 に答える