added 调整公共函数位置

This commit is contained in:
zhaoxiang 2017-04-24 17:47:44 +08:00
parent 12477fb90b
commit e3e2ab65a9
2 changed files with 14 additions and 14 deletions

View File

@ -1,18 +1,4 @@
<?php
/**
* 系统非常规MD5加密方法
* @param string $str 要加密的字符串
* @param string $auth_key 要加密的字符串
* @return string
* @author jry <598821125@qq.com>
*/
function user_md5($str, $auth_key = ''){
if(!$auth_key){
$auth_key = C('AUTH_KEY');
}
return '' === $str ? '' : md5(sha1($str) . $auth_key);
}
/**
* 判断是否是系统管理员
* @param mixed $uid

View File

@ -24,6 +24,20 @@ if (!function_exists('apache_request_headers')) {
}
}
/**
* 系统非常规MD5加密方法
* @param string $str 要加密的字符串
* @param string $auth_key 要加密的字符串
* @return string
* @author jry <598821125@qq.com>
*/
function user_md5($str, $auth_key = ''){
if(!$auth_key){
$auth_key = C('AUTH_KEY');
}
return '' === $str ? '' : md5(sha1($str) . $auth_key);
}
/**
* @param $url
* @param int $timeOut