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

Linux环境下让PHP支持curl

WBOY
Release: 2016-06-23 13:34:19
Original
1395 people have browsed it


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

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

查找extension_dir:php -i | grep extension_dir
Copy after login

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

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

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template