zoukankan      html  css  js  c++  java
  • 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 [IlluminateContractsHttpKernel] 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(IlluminateContractsHttpKernel::class);
    
    $response = $kernel->handle(
        $request = IlluminateHttpRequest::capture()
    );
    
    $response->send();
    
    $kernel->terminate($request, $response);
    

    是这一句放到lumen里面就错了

    $kernel = $app->make(IlluminateContractsHttpKernel::class);
    

    把lumen的index.php拷过来就行了

  • 相关阅读:
    CircleImageManager——圆形 / 圆角图片的工具类
    自定义的开关按钮——SwitchButton
    将win7电脑无线网变身WiFi热点,让手机、笔记本共享上网
    用纯JAVA代码来创建视图
    用自定义的RoundImageView来实现圆形图片(可加边框)
    用开源项目RoundedImageView来实现 圆形 / 圆角 / 椭圆的图片
    ImageView和onTouchListener实现,点击查看图片细节
    MySql修改字符集
    Docker下操作指令
    CentOS下Docker安装
  • 原文地址:https://www.cnblogs.com/HappyTeemo/p/15396937.html
Copyright © 2011-2022 走看看