作者热门文章
- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我在 .env
文件中有 APP_DEBUG=true
:
APP_ENV=local
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://test.dev
我故意使用不正确的不正确的 url(例如:test.dev/asdsadsa
),它不在 web.php 路由文件中。
当路由不存在时,我预计会得到一个 laravel 调试错误
Sorry, the page you are looking for could not be found.
NotFoundHttpException in RouteCollection.php line 161:
但是,它一直显示 404 错误页面 (views/errors/404.blade.php),即使 APP_DEBUG
设置为 true。
我尝试过的:
1 - 我什至测试过以确保 laravel 可以读取 .env 文件:
Route::get('/', function() {
dd(env('APP_DEBUG'));
});
返回 true
2 - php artisan config:cache
没有修复它。
3 - chmod -R 777 storage
没有修复它。
最佳答案
如果在 views/errors
中有 404 错误页面,它将被显示,如果没有,将显示 NotFoundHttpException
。
关于php - APP_DEBUG=true 被忽略,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40193995/
我在 .env 文件中有 APP_DEBUG=true: APP_ENV=local APP_DEBUG=true APP_LOG_LEVEL=debug APP_URL=http://test.de
我的应用程序的app_debug.apk运行良好。我可以使用 oauth 登录。但同一个应用程序的app_release.apk的oauth不起作用。我尝试使用 minifyEnabled false
我是一名优秀的程序员,十分优秀!