zoukankan      html  css  js  c++  java
  • laravel(1)

    使用composer下载一个七牛云的Laravel扩展包:composer require itbdw/laravel-storage-qiniu,但是composer报错。

    [ComposerDownloaderTransportException]
    Your configuration does not allow connection to http://packagist.phpcomposer.com. See https://getcomposer.org/doc/06-config.md#secure-http for details.

    网上找到解决办法,记录一下:


    解决方法是设置一个本地或全局的composer配置:

    composer config secure-http false

    全局设置:

    composer config -g secure-http false

    意义是默认禁用https请求,就可以了。

    有时候composer install/update的时候会报错:

    [ComposerDownloaderTransportException] 
    Your configuration does not allow connection to http://ooxx/xxoo.git. See https://getcomposer.org/doc/06-config.md#secure-http for details.


    解决方法是设置一个本地或全局的composer配置:

    composer config secure-http false

    全局设置:

    composer config -g secure-http false


    意义是默认禁用https请求,就可以了

    查看laravel版本    php artisan --version

    5.2.26<使用版本

    主要更新内容. 

      默认web全局中间件,

    受影响内容(seesion)

         csrf验证(postman 模拟post提交的时候会报错)

      session(return back()->with('msg','xxx'))

    配置

    还记得在一开始讲环境配置那一章讲的App Key的内容吗?
    Encryption就是拿App Key作为基础进行加密运算,同样借由App Key还可以进行逆向解密。 App Key一定要合理设置,否则加密就不安全了。 命令行生成app key:

    1. php artisan key:generate

    加密和解密

      1. $encryptedValue = Crypt::encrypt('Hello World');
      2. $decrypted = Crypt::decrypt($encryptedValue);
      3. //'Hello World'
  • 相关阅读:
    项目开发中的注意点和技巧
    addslashes — 使用反斜线引用字符串
    PHP error_reporting() 错误控制函数功能详解
    零碎收集cocos知识
    LeetCode:二叉树的前序遍历【144】
    SpringBoot学习笔记:SpringBootAdmin
    LeetCode:简化路径【71】
    LeetCode:组合总数II【40】
    LeetCode:全排列II【47】
    LeetCode:全排列【46】
  • 原文地址:https://www.cnblogs.com/zlzxc/p/6377439.html
Copyright © 2011-2022 走看看