摘要: $mpfen = preg_replace( "@@is", "", $mpfen ); 阅读全文
posted @ 2013-09-10 10:25 kevin_xk 阅读(129) 评论(0) 推荐(0) 编辑
摘要: jquery ajax结构不规范到时再ie8以下的用户不能正常使用。比如[1,2,]、{1,2,},结构内部的最后不能有“,”。 阅读全文
posted @ 2013-09-06 17:15 kevin_xk 阅读(327) 评论(0) 推荐(0) 编辑
摘要: $con = file_get_contents("http://v.guozitv.com/api/androidxml.php?"); $data = simplexml_load_string($con); print_r($data); echo $data->details; exit;$doc = new DOMDocument();$doc->load( $xgweb );$books = $doc->getElementsByTagName( "item" );foreach( $books as $book ){ $a 阅读全文
posted @ 2013-07-17 14:11 kevin_xk 阅读(160) 评论(0) 推荐(0) 编辑
摘要: //判断年龄 $('#info_age').change(function(){ var _val = $(this).val(); if(!(/^[0-9]+$/.test( _val ))||_val 100){ alert("请输入的年龄在0-100之间"); } }); 阅读全文
posted @ 2013-07-10 15:43 kevin_xk 阅读(939) 评论(0) 推荐(0) 编辑
摘要: 性别下拉框的jquery //点击性别文本框,弹窗具体信息 $(".info_select").click(function(){ $("#select_sex").css("display" , ($("#select_sex").css("display")=='none' ? "block" : 'none')); (event || window.event).cancelBubble = true }); $("#info_ 阅读全文
posted @ 2013-07-10 14:56 kevin_xk 阅读(227) 评论(0) 推荐(0) 编辑
摘要: /** * 获取替换文章中的图片路径 * @param string $xstr 内容 * @param string $keyword 创建照片的文件名 * @param string $oriweb 网址 * @return string * */function replaceimg($xstr,$keyword, $oriweb){ //保存路径 $d = date('Ymd', time()); $dirslsitss = '/var/www/weblist/uploads/'.$keyword.'/'.$d;//分类是否存在 if(! 阅读全文
posted @ 2013-07-05 14:13 kevin_xk 阅读(1418) 评论(0) 推荐(1) 编辑
摘要: /** * 取出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) 编辑