多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
# xn\_error() ## xn\_error() ``` <pre class="calibre11">``` xn_error($no, $str, $return = FALSE) ``` ``` #### 【功能】 对全局变量 $errno, $errstr 进行设置,并且默认返回 FALSE。 #### 【原型】 ``` <pre class="calibre11">``` function xn_error($no, $str, $return = FALSE) { global $errno, $errstr; $errno = $no; $errstr = $str; return $return; } ``` ``` #### 【参数】 ``` <pre class="calibre11">``` $no:错误码 $str:错误字符串 $return:返回值 ``` ``` #### 【用例】 ``` <pre class="calibre11">``` <?php include './xiunophp/xiunophp.php'; function check_email($email) { if(empty($email)) { return xn_error(-1, 'Email 为空'); } } my_func('') OR echo $errstr; ?> ``` ```