Possible Duplicate:
Writing a function in php
I'm using the following code
echo 'Curl: ', function_exists('curl_version') ? 'Enabled' : 'Disabled';
this can get it enabled or disabled
but I would like to make as function say function name is _iscurl
then I can call it as following any where in my website code
if (_iscurl()){ echo "this is enabled"; // will do an action }else{ echo "this is disabled"; // will do another action }
almost same as my previous question check if allow_url_fopen is enabled or not
Create phpinfo.php file and save. phpinfo; ?> Then go to http://domainname/phpinfo.php to check whether CURL is enabled or not.
Open the command prompt, and type “curl -help“. If there are no errors, and displays all the options of curl, it's installed on your Windows 11/10.
How do I check the version? If cURL is registered at the command line, you should be able to use where curl to determine the location of curl.exe (the Windows where command is similar to which on *nix-style systems). You can also use curl -V to check your cURL version.
Just return your existing check from a function.
function _isCurl(){ return function_exists('curl_version'); }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With