Lumen 5.2调试模式不起作用

时间:2016-05-23 00:28:11

标签: php debugging config lumen

流明的异常调试输出有问题。 我启用了调试模式,但它似乎无法正常工作。

我的配置/ app.php:

<?php
return [

    /*
    |--------------------------------------------------------------------------
    | Encryption Key
    |--------------------------------------------------------------------------
    |
    | This key is used by the Illuminate encrypter service and should be set
    | to a random, 32 character string, otherwise these encrypted strings
    | will not be safe. Please do this before deploying an application!
    |
    */
    'env' => 'local',
    'debug' => true,

    'key' => env('APP_KEY', 'SomeRandomString!!!'),

    'cipher' => 'AES-256-CBC',

    /*
    |--------------------------------------------------------------------------
    | Application Locale Configuration
    |--------------------------------------------------------------------------
    |
    | The application locale determines the default locale that will be used
    | by the translation service provider. You are free to set this value
    | to any of the locales which will be supported by the application.
    |
    */
    'locale' => env('APP_LOCALE', 'en'),
    /*
    |--------------------------------------------------------------------------
    | Application Fallback Locale
    |--------------------------------------------------------------------------
    |
    | The fallback locale determines the locale to use when the current one
    | is not available. You may change the value to correspond to any of
    | the language folders that are provided through your application.
    |
    */
    'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'),

];

在bootstrap.php中我有

$app->configure('app');

所以,我谢绝了 - 配置文件成功加载。

但是当我的应用程序抛出异常流明时输出 - “哎呀,看起来像是出了问题。”

没有任何调试信息。

有什么问题?

P.S我不想使用.env配置文件。

1 个答案:

答案 0 :(得分:0)

你能从日志中提取更多信息吗?

至于配置文件

lumen正在使用Dotenv来管理配置文件。默认配置文件.env在boostrap / app.php中加载为:

(new Dotenv\Dotenv(__DIR__.'/../'))->load();

因此,您可以通过以下方式定义自己的配置文件路径和名称:

(new Dotenv\Dotenv($your_config_file_real_path, $your_config_file_name))->load();

注意:如果要加载不同的文件,可以使用多个配置文件,如:

(new Dotenv\Dotenv($your_config_file_real_path1, $your_config_file_name1))->load();
(new Dotenv\Dotenv($your_config_file_real_path2, $your_config_file_name2))->load();