可能重复:
在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
function_exists('curl_version')作您的_iscurl()功能?