Home >Backend Development >PHP Problem >How to install curl in php under ubuntu
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.
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!