zoukankan      html  css  js  c++  java
  • laravel 常见问题

     【1】解决 Laravel启动时报错 出现 "Please provide a valid cache path" 问题

    新建项目报错:

        //错误提示: 
        InvalidArgumentException in Compiler.php line 36:
        Please provide a valid cache path.
    

    错误提示的出错:

        // vendor/illuminate/view/Compilers/Compiler.php
    
        if (! $cachePath) {
            throw new InvalidArgumentException('Please provide a valid cache path.');
        }
    

    这个路径是在 config/cache.php 中指定的,可以自行修改成其他地址:

    // cache 配置文件示例  
    return [
        // ...
        'stores' => [
            // ...
            'file' => [
                'driver' => 'file',
                'path'   => storage_path('framework/cache'), //缓存地址
            ],
        ],
        // ...  
    ]
    

    创建目录:

     ✗ mkdir -p storage/framework/views
     ✗ mkdir -p storage/framework/cache
     ✗ mkdir -p storage/framework/sessions
    

    确保 storage 目录结构如下:

    ./storage
    ├── app
    ├── framework
    │   ├── cache
    │   ├── sessions
    │   └── views
    └── logs
        └── lumen.log
    

    注意这些目录要有读写权限.

  • 相关阅读:
    数论学习之乘法逆元
    数论学习之扩展欧几里得
    数论学习之费马与欧拉
    一次函数
    东南西北
    接水问题
    脱水缩合
    背单词
    单词接龙
    字符串,字符数组
  • 原文地址:https://www.cnblogs.com/Kevin-1967/p/8203903.html
Copyright © 2011-2022 走看看