如何检查是启用还是禁用 curl
2022-08-30 08:05:06
可能的重复:
用php编写函数
我正在使用以下代码
echo 'Curl: ', function_exists('curl_version') ? 'Enabled' : 'Disabled';
这可以启用或禁用它
但我想做作为函数说函数名称是_iscurl
然后我可以将其称为在我的网站代码中的任何位置
if (_iscurl()){
echo "this is enabled"; // will do an action
}else{
echo "this is disabled"; // will do another action
}
几乎与我之前的问题相同,请检查是否启用了allow_url_fopen