Home>Article>Backend Development> How to install curl in php under ubuntu

How to install curl in php under ubuntu

王林
王林 Original
2020-07-10 10:30:21 2990browse

How to install curl in php under ubuntu: You can install it by executing the apt-get command. The specific method is: 1. Execute the [sudo apt-get install curl libcurl3-dev php7.0-curl] command to install; 2. Restart the apache server.

How to install curl in php under ubuntu

Environment: ubuntu16.04

(Recommended tutorial:php tutorial)

Installation method :

We can install it through the apt-get command.

First, execute the following command to install;

# sudo apt-get install curl libcurl3 libcurl3-dev php7.0-curl

Okay, now PHP cURL has been installed.

Then, execute the following command to restart the Apache server

# sudo /etc/init.d/apache2 restart

If you still have problems after completion, you can try editing the php.ini file and add the following content at the end:

extension=curl.so

After saving the file, restart the Apache server.

The above is the detailed content of How to install curl in php under ubuntu. For more information, please follow other related articles on the PHP Chinese website!

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
Previous article:How to catch errors in php Next article:How to catch errors in php