06 2013 档案

摘要:/** * 取出html标签 * * @access public * @param string str * @return string * */function deletehtml($str) { $str = trim($str); //清除字符串两边的空格 $str = strip_tags($str,""); //利用php自带的函数清除html格式。保留P标签 $str = preg_replace("/\t/","",$str); //使用正则表达式匹配需要替换的内容,如:空格,换行,并将替换为空。 $str = p 阅读全文
posted @ 2013-06-27 10:28 kevin_xk 阅读(420) 评论(1) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2013-06-26 18:45 kevin_xk 阅读(112) 评论(0) 推荐(0) 编辑
摘要:preg_match_all('#]*>#i', $xstr, $match);/** * 获取图片src * @access public * @param string keyword * @param string xstr * @return array * */function findimg($keyword,$xstr){ $d = date('Ymd', time()); $dirslsitss = '/var/www/weblist/uploads/'.$keyword.'/'.$d;//分类是否存在 if 阅读全文
posted @ 2013-06-25 10:15 kevin_xk 阅读(395) 评论(0) 推荐(0) 编辑
摘要:echo json_decode('"\u4e2d"');exit; 阅读全文
posted @ 2013-06-24 15:43 kevin_xk 阅读(124) 评论(0) 推荐(0) 编辑
摘要:换行符unix系列用 \nwindows系列用 \r\nmac用 \rPHP中可以用PHP_EOL来替代,以提高代码的源代码级可移植性 阅读全文
posted @ 2013-06-24 11:48 kevin_xk 阅读(111) 评论(0) 推荐(0) 编辑
摘要:/etc/init.d/mysql restart/etc/init.d/mysql stop/etc/init.d/mysql start 阅读全文
posted @ 2013-06-21 14:26 kevin_xk 阅读(151) 评论(0) 推荐(0) 编辑
摘要:discuz获取数据库中的信息,把表中信息的标签进行转化require_once libfile('function/discuzcode');$message = discuzcode($row[message]); 阅读全文
posted @ 2013-06-13 14:26 kevin_xk 阅读(1400) 评论(0) 推荐(0) 编辑