How to install php-curl in Ubuntu 16.04

 

how to check if curl is enabled or disabled

Create index.php
 echo 'Curl: ', function_exists('curl_version') ? 'Enabled' : 'Disabled';

Install Curl
In Ubuntu 16.04 default PHP version is 7.0, if you want to use different version then you need to install PHP package according to PHP version:

1.

    PHP 7 : sudo apt-get install php-curl
    PHP 5.6: sudo apt-get install php5.6-curl
    PHP 5.5: sudo apt-get install php5.5-curl

2.

sudo service apache2 restart

https://stackoverflow.com/questions/38800606/how-to-install-php-curl-in-ubuntu-16-04

https://stackoverflow.com/questions/13433946/how-to-check-if-curl-is-enabled-or-disabled