本文介绍了如何检查是否启用了卷曲的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用以下代码

echo 'Curl: ', function_exists('curl_version') ? 'Enabled' : 'Disabled';

这可以启用或禁用它

但是我想让函数说函数名是_iscurl

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
}

与我之前的问题几乎相同检查是否启用allow_url_fopen

almost same as my previous question check if allow_url_fopen is enabled or not

推荐答案

只需从 function .

function _isCurl(){
    return function_exists('curl_version');
}

这篇关于如何检查是否启用了卷曲的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 04:12
查看更多