lumen、laravel问题汇总
框架报500
1.chmod 777 -R storage 将日志目录权限设置下。
2.修改fastcgi,将代码目录包含进去。
fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/:/home/www/";
3.nginx.conf
location / {
try_files $uri $uri/ /index.php$is_args$query_string;
}
No application encryption key has been specified.
1、.env.example 改名使用命令 copy 修改为 .env
2、使用命令 php artisan key:generate 获取密码
[IlluminateContractsHttpKernel] is not instantiable
报错
(1/1) BindingResolutionExceptionTarget [Illuminate\Contracts\Http\Kernel] is not instantiable.
in Container.php line 945
at Container->notInstantiable('Illuminate\\Contracts\\Http\\Kernel')in Container.php line 785
at Container->build('Illuminate\\Contracts\\Http\\Kernel')in Container.php line 658
at Container->resolve('Illuminate\\Contracts\\Http\\Kernel', array())in Container.php line 609
at Container->make('Illuminate\\Contracts\\Http\\Kernel', array())in Application.php line 260
at Application->make('Illuminate\\Contracts\\Http\\Kernel')in index.php line 52
检查public/index.php
laravel的:
<?php
/**
* Laravel - A PHP Framework For Web Artisans
*
* @package Laravel
* @author Taylor Otwell <taylor@laravel.com>
*/
define('LARAVEL_START', microtime(true));
/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader for
| our application. We just need to utilize it! We'll simply require it
| into the script here so that we don't have to worry about manual
| loading any of our classes later on. It feels great to relax.
|
*/
require __DIR__.'/../vendor/autoload.php';
/*
|--------------------------------------------------------------------------
| Turn On The Lights
|--------------------------------------------------------------------------
|
| We need to illuminate PHP development, so let us turn on the lights.
| This bootstraps the framework and gets it ready for use, then it
| will load up this application so that we can run it and send
| the responses back to the browser and delight our users.
|
*/
$app = require_once __DIR__.'/../bootstrap/app.php';
/*
|--------------------------------------------------------------------------
| Run The Application
|--------------------------------------------------------------------------
|
| Once we have the application, we can handle the incoming request
| through the kernel, and send the associated response back to
| the client's browser allowing them to enjoy the creative
| and wonderful application we have prepared for them.
|
*/
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);
$response->send();
$kernel->terminate($request, $response);
是这一句放到lumen里面就错了
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
把lumen的index.php拷过来就行了
lumen、laravel问题汇总的更多相关文章
- 关于Lumen / Laravel .env 文件中的环境变量是如何生效的
.env 文件包含默认环境变量,我们还可自定义其他任何有效的变量,并可通过 调用 env() 或 $_SERVER 或 $_ENV 来获取该变量.那么env()是如何加载到这些变量的呢?在Lume ...
- PHP Lumen Laravel 解决validate方法自定义message无效的问题
/** * 由于 \Laravel\Lumen\Routing\ProvidesConvenienceMethods::validate 在验证不通过时, * 抛出 \Illuminate\Valid ...
- lumen laravel response对象返回数据
Route::get('home', function () { $content = "内容"; $status = 301; $value = 'text/html'; // ...
- laravel方法汇总详解
1.whereRaw() 用原生的SQL语句来查询,whereRaw('select * from user') 就和 User::all()方法是一样的效果 2.whereBetween() 查询时 ...
- Lumen框架—升级改造之路-仓储层
仓储层与逻辑层搭建 Lumen官方文档:https://lumen.laravel.com/docs/5.5 我的项目地址:https://github.com/BusinessL/big-lume ...
- Lumen框架—升级改造之路-开篇
一.前言 首先,我先阐述下,为什么要做这件事.lumen是一款比较轻型的PHP框架,但是,作为项目开发来说,它还是缺少很多东西,比如Response返回值规范的自定义,异常抛出格式的自定义,以及 ...
- Lumen实现用户注册登录认证
Lumen实现用户注册登录认证 前言 Lumen是一个基于Laravel的微框架,号称是以速度为生.截用Lumen官网的一段,号称是比silex和slim还要快. 本文将用Lumen来实现一个完整的用 ...
- 关于Laravel框架中Guard的底层实现
1. 什么是Guard 在Laravel/Lumen框架中,用户的登录/注册的认证基本都已经封装好了,开箱即用.而登录/注册认证的核心就是: 用户的注册信息存入数据库(登记) 从数据库中读取数据和用户 ...
- lumen Rest API 起步
lumen Rest API 起步 修改项目文件 .env DB_DATABASE=<数据库名> DB_USERNAME=<数据库用户名> DB_PASSWORD=<数据 ...
随机推荐
- python从网络摄像头获取rstp视频流并截取图片保存
import cv2 def get_img_from_camera_net(folder_path): cap = cv2.VideoCapture("rtsp://admin:a ...
- redis小结 1-2
1.Redis 发布订阅 Redis 发布订阅(pub/sub)是一种消息通信模式:发送者(pub)发送消息,订阅者(sub)接收消息. Redis 客户端可以订阅任意数量的频道. 下图展示了频道 c ...
- vue-cli3 取消eslint 校验代码
项目生成后会有个.eslintrc.js文件 module.exports = { root: true, env: { node: true }, 'extends': [ 'plugin:vue/ ...
- deepin(debian)中双网卡上内外网的设置方法(通过NetworkManager运行脚本)
国产良心操作系统deepin,界面好看,反应速度快,开箱即用,深度商店里有非常多好用的linux.windows软件,其windows软件通过crossover进行运行,还可以运行一些安卓的apk程序 ...
- 【vue】两个页面间传参 - props
目录 Step1 设置可以 props 传递数据 Step2 跳转前页面中传递数据 Step3 跳转后的页面接收数据 从 A 页面跳转到 B 页面, 参数/数据通过 props 传递到 B 页面,这种 ...
- MySQL MVCC原理深入探索
一.MVCC的由来 二.MVCC的实际应用 RR级别场景 RC级别场景 三.MVCC的实现 3.1 多版本的数据从哪里来--Undo Log 3.1.1 插入操作对应的undo log 3.1.2 删 ...
- Spring中IOC的理解
Spring中IOC的理解 1.什么是IOC? (1)控制反转.把对象创建和对象间的调用过程交给Spring进行管理. (2)使用IOC的目的:为了耦合度降低. 2.IOC底层原理? (1)xml解析 ...
- IL合集
由于之前写的表达式树合集,未编写任何注释且是以图片的形式展现给大家,在这里向各位看官道歉了,接下来为大家奉上新鲜出炉的香喷喷的IL合集,后面会持续更新,各位看官点关注不迷路,之前答应的手写IOC以及多 ...
- bzoj2242,洛谷2485----SDOI2011计算器(exgcd,qsm,bsgs模板)
就是一道模板题! 这里再强调一下 BSGS 考虑方程\(a^x = b \pmod p\) 已知a,b,p\((2 \le p\le 10^9)\),其中p为质数,求x的最小正整数解 解法: 注意到如 ...
- Mac录屏同时录制系统声音和画外音(Soundflower无法安装解决方案)
个人博客地址:xzajyjs.cn 前言 以前一直有录屏的需求,但苦于自带的QuickTime 无法录制内屏声音,一直使用的是第三方的app.近期开腾讯会议需要录屏,但主持人本身没有开启录屏权限,只好 ...