<?php/**用户管理2011/8/22kcj*/include "isLogin.php";include "../conn/conn.php";$sql="select * from user";$rst=mysql_query($sql);$totalnum=mysql_num_rows($rst);$pagesize=5;$page=$_GET['page'];if($pag...
function _strip_tags($tags_a,$str){ foreach ($tags_a as $tag) { $p[]="/(<(?:\/".$tag."|".$tag.")[^>]*>)/i"; } $return_str = preg_replace($p,"",$str); re...
<?phpclass get_c_str {var $str;var $start_str;var $end_str;var $start_pos;var $end_pos;var $c_str_l;var $contents;function get_str($str,$start_str,$end_str){ $this->str = $str; $this->...
//获取省份function getArea($ip){$ip = getIp(); $res1 = file_get_contents("http://pv.sohu.com/cityjson?ie=utf-8"); $str = cut('cname','};',$res1); $str = str_replace('"',"",$str...
function fetchRepeatMemberInArray($array){// 获取去掉重复数据的数组 $unique_arr = array_unique($array); // 获取重复数据的数组 $repeat_arr = array_diff_assoc($array, $unique_arr); return $repeat_arr;}
/** *求两个已知经纬度之间的距离,单位为米 *@param lng1,lng2 经度 *@param lat1,lat2 纬度 *@return float 距离,单位米 **/function getdistance($lng1,$lat1,$lng2,$lat2){//将角度转为狐度 $radLat1=deg2rad($lat1);//deg2rad()函数将角度转换为弧度 $rad...
/**对数据进行编码转换@param array/string $data 数组@param string $output 转换后的编码Created on 2016-7-13 */function array_iconv($data,$output = 'utf-8') {$encode_arr = array('UTF-8','ASCII','GBK','GB2312','BIG5','...
function unicode_decode($name){// 转换编码,将Unicode编码转换成可以浏览的utf-8编码 $pattern = '/([\w]+)|(\\\u([\w]{4}))/i'; preg_match_all($pattern, $name, $matches); if (!empty($matches)) { $name = ''; for ...
/**$data 文件夹路径**/function list_file($date){ $fileArr = []; //1、首先先读取文件夹 $temp=scandir($date); //遍历文件夹 foreach($temp as $v){ $a=$date.'/'.$v; if(is_dir($a)){//如果是文件夹则执行 if($v=='.' || $v=...
/**验证邮箱格式@param $email 邮箱@return bool */function is_email($email) {$chars = "/^[0-9a-zA-Z]+(?:[\_\.\-][a-z0-9\-]+)*@[a-zA-Z0-9]+(?:[-.][a-zA-Z0-9]+)*\.[a-zA-Z]+$/i"; if (preg_match($chars...