phpstudy 中使用 composer 遇到的問題

  • 問題描述
    [Composer\Downloader\TransportException] The "https://mirrors.aliyun.com/composer/packages.json" file could not be downloaded: allow_url_fopen must be enabled in php.ini (https:// wrapper is disabled in the server configuration by allow_url_fopen=0 failed to open stream: no suitable wrapper could be found)
  • 問題解決
    php.ini中搜索allow_url_fopen將其修改爲allow_url_fopen=on
  • 其他
    推薦使用阿里鏡像composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/,使用composer config -g --unset repo.packagist取消repo.packagist
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章