最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

php獲取遠(yuǎn)程https內(nèi)容時(shí)提示PHP Warning: copy(): Unable to find the wrapper “https“ 解決方法

 更新時(shí)間:2024年10月11日 11:09:37   作者:tekin  
這篇文章主要介紹了php獲取遠(yuǎn)程https內(nèi)容時(shí)提示PHP Warning: copy(): Unable to find the wrapper “https“ 解決方法,文中通過(guò)代碼和圖文給大家講解的了解決方案,具有一定的參考價(jià)值,需要的朋友可以參考下

異常信息:

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"

PHP Warning:  copy(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1

PHP Stack trace:

PHP   1. {main}() Command line code:0

PHP   2. copy($source_file = 'https://getcomposer.org/installer', $destination_file = 'composer-setup.php') Command line code:1

Warning: copy(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1

Call Stack:

0.0001     388024   1. {main}() Command line code:0

0.0008     388024   2. copy($source_file = 'https://getcomposer.org/installer', $destination_file = 'composer-setup.php') Command line code:1

異常原因

這個(gè)異常是因?yàn)楫?dāng)前的php沒(méi)有配置openssl模塊, 所以在php訪問(wèn)https的內(nèi)容時(shí)就提示 Unable to find the wrapper "https"  異常。 

解決方法: 安裝 openssl擴(kuò)展

在macos中通過(guò)macport安裝php后,默認(rèn)是沒(méi)有安裝openssl擴(kuò)展的, 需要我們手動(dòng)安裝一下這個(gè)openssl的擴(kuò)展。

# 首先確定當(dāng)前php版本
php -version
 
# 然后安裝 openssl擴(kuò)展 , 這里以php7.2版本為例
sudo port install php72-openssl

如果你的php非port安裝的,解決方法也是一樣的,安裝對(duì)應(yīng)php的 openssl 擴(kuò)展即可。

通過(guò)port search查找可用的php openssl擴(kuò)展包參考

命令: port search --name --line --regex '^php(\d+)-openssl'

以上就是php獲取遠(yuǎn)程https內(nèi)容時(shí)提示PHP Warning: copy(): Unable to find the wrapper “https“ 解決方法的詳細(xì)內(nèi)容,更多關(guān)于php獲取https提示Unable to find的資料請(qǐng)關(guān)注腳本之家其它相關(guān)文章!

相關(guān)文章

最新評(píng)論

神池县| 砀山县| 弋阳县| 临沂市| 图木舒克市| 山阴县| 田东县| 黄龙县| 方正县| 吴江市| 精河县| 苏尼特右旗| 榆林市| 嘉善县| 金溪县| 扬中市| 新巴尔虎右旗| 香河县| 大埔区| 彝良县| 枣阳市| 永顺县| 肥乡县| 汽车| 赣榆县| 镇坪县| 云和县| 南安市| 化隆| 乌什县| 揭阳市| 丹东市| 犍为县| 策勒县| 安丘市| 三台县| 巴里| 中江县| 祥云县| 平凉市| 博爱县|