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'
  • 相关阅读:
    2018杭电多校第六场1009(DFS,思维)
    Atcoder Regular Contest 085F(动态规划,线段树)
    IOS各类优化方案集锦
    iOS网络加载图片缓存策略之ASIDownloadCache缓存优化
    oc
    OC 内存管理机制总结
    ARC小知识
    oc常见误区
    常用第三方(分享,支付,二维码,语音,推送)
    UIKit,Core Data , Core Graphics, Core Animation,和OpenGLES框架
  • 原文地址:https://www.cnblogs.com/zlzxc/p/6377439.html
Copyright © 2011-2022 走看看