可能的重复:
在php中编写一个函数
我正在使用以下代码
echo 'Curl: ', function_exists('curl_version') ? 'Enabled' : 'Disabled';
这可以启用或禁用它
但我想让 as 函数说函数名称是_iscurl
然后我可以在我的网站代码中的任何位置调用它
if (_iscurl()){
echo "this is enabled"; // will do an action
}else{
echo "this is disabled"; // will do another action
}
和我之前的问题几乎一样检查allow_url_fopen是否启用
只需从以下机构退还您现有的支票即可:function.
function _isCurl(){
return function_exists('curl_version');
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)