OneTool

环境检测

检测系统环境是否支持该程序运行


{php} function checkfunc($f, $m = false) { if (function_exists($f)) { return '正常'; } else { if ($m == false) { return '不支持'; } else { return '不支持'; } } } {/php} {if condition="version_compare(PHP_VERSION, '8.0.0', '<')"} {/if}
  • curl_exec 函数 {:checkfunc('curl_exec', true)}
  • file_get_contents 函数 {:checkfunc('file_get_contents', true)}