How to check curl is enabled or not in PHP

by garnet.barrows , in category: Technology , 4 years ago

How to check curl is enabled or not in PHP

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by bria_metz , 4 years ago

use function_exists('curl_version') function to check curl is enabled or not. This function returns true if curl is enabled other false

Example :

1
2
3
4
5
6
7
if(function_exists('curl_version') ){
  echo "Curl is enabled";
}else{

echo "Curl is not enabled";

}


Related Threads:

How to Pass JSON Data in a URL using CURL in PHP ?
How to Create a Composer Package in 2025?
What Is Php Error Handling in 2025?
What is difference Between PHP 5 and 7?
What Are the Key Features That Make Codeigniter Ideal for Rapid Php Application Development?
How to Maintain a Propane Grill to Last Longer in 2025?