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

How to install curl in php under ubuntu

王林
Release: 2023-03-02 09:26:02
Original
3129 people have browsed it

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
Copy after login

Okay, now PHP cURL has been installed.

Then, execute the following command to restart the Apache server

# sudo /etc/init.d/apache2 restart
Copy after login

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
Copy after login

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!

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