Home >Backend Development >PHP Tutorial >Linux环境下让PHP支持curl

Linux环境下让PHP支持curl

WBOY
WBOYOriginal
2016-06-23 13:34:191404browse


1)首先查看php5-curl是否已安装:dpkg -l | grep 'php5-curl'
2)如果没有安装,则:apt-get install php5-curl

3)确保 extension_dir存在,并且包含curl.so,

查找extension_dir:php -i | grep extension_dir

4)确保 /etc/php5/mods-available/curl.ini存在,文件内容如下:

; configuration for php CURL module
; priority=20
extension=curl.so

5)如果以上步骤均确定,重启服务器。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn