上一页 1 ··· 4 5 6 7 8 9 10 11 12 下一页
摘要: 一、下载 VideoUrlParser.rar二、文件目录 VideoUrlParser.class //核心文件,所有正则均在此三、目前只支持url地址,可以自行写正则添加基于swf、embed等格式和标签的地址四、返回说明 title 标题 img 所略图 object 视频地址 阅读全文
posted @ 2013-04-05 16:39 忆殇之痕 阅读(251) 评论(0) 推荐(0) 编辑
摘要: 一、下载地址: http://ueditor.baidu.com/website/download.html (选择UBuilder版本)二、配置ueditor 在目录中找到editor_config文件 在var URL下面添加一行 window.UEDITOR_HOME_URL="/ueditor/"; //地址为你命名的ueditor目录三、ueditor获得编辑内容的方法var ue = UE.getEditor('editor'); //实例化类ue.getAllHtml() //获得整个html的内容ue.getConte... 阅读全文
posted @ 2013-04-05 16:05 忆殇之痕 阅读(444) 评论(0) 推荐(0) 编辑
摘要: 即使关掉浏览器也能继续执行ignore_user_abort(); //即使Client断开(如关掉浏览器),PHP脚本也可以继续执行.set_time_limit(0); // 执行时间为无限制,php默认的执行时间是30秒,通过set_time_limit(0)可以让程序无限制的执行下去 阅读全文
posted @ 2013-04-02 11:59 忆殇之痕 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 1.首先是下载PHPMailer http://code.google.com/a/apache-extras.org/p/phpmailer/2.解压 从中取出class.phpmailer.php 和class.smtp.php 放到你的项目的文件夹,因为我们等下会引用到它们.3.创建发送邮件的函数,其中你需要配置smtp服务器function postmail($to,$subject = '',$body = ''){ //Author:Jiucool WebSite: http://www.jiucool.com //$to 表示收件人地址 $subj 阅读全文
posted @ 2013-04-02 11:40 忆殇之痕 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 例:function is_mobile_request() { $_SERVER['ALL_HTTP'] = isset($_SERVER['ALL_HTTP']) ? $_SERVER['ALL_HTTP'] : ''; $mobile_browser = '0'; if(preg_match('/(up.browser|up.link|mmp|symbian|smartphone|midp|wap|phone|iphone|ipad|ipod|android|xoom)/i', strtolo 阅读全文
posted @ 2013-04-02 11:33 忆殇之痕 阅读(520) 评论(0) 推荐(0) 编辑
摘要: 在php中设置时区 date_default_timezone_set('PRC'); // PRC为中华人民共和国php中时间和时间戳相互转化echo date("Y-m-d H:i:s",1364874283); //转化为正常时间echo strtotime("2013-04-02 11:44:43"); //转化为时间戳 阅读全文
posted @ 2013-04-02 11:15 忆殇之痕 阅读(99) 评论(0) 推荐(0) 编辑
摘要: <canvas id="can" width='500' height='500'>你的浏览器不支持</canvas> //创建一个画布js:var c=document.getElementById('can') //获取节点var canvas=c.getContext("2d"); //使用2D引擎canvas.fillStyle="rgba(0,0,255,0.2)"; //定义一个颜色canvas.fillRect(0,0,300,300); //定义一 阅读全文
posted @ 2013-04-01 17:26 忆殇之痕 阅读(182) 评论(0) 推荐(0) 编辑
摘要: $(function(){ $(document).click(function(event){ alert('x:'+event.clientX+',y:'+event.clientY); //客户端横坐标和纵坐标 }) }) 阅读全文
posted @ 2013-04-01 16:38 忆殇之痕 阅读(101) 评论(0) 推荐(0) 编辑
摘要: \d:用于匹配从0到9的数字;\w:用于匹配字母,数字或下划线字符;?:0或者1个+:至少一次*:0或多次.:用于匹配除换行符之外的所有字符。^:以什么开头[0-3]:0到3之间[^0-3]:除了0到3之间以外 阅读全文
posted @ 2013-04-01 16:02 忆殇之痕 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 1. 验证E-mail地址 preg_match('/^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[@][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[.][a-zA-Z]{2,4}$/',$email)//为了更加有效验证电子邮件地址,推荐使用filer_varfilter_var('test+email@ansoncheung',FILTER_VALIDATE_EMAIL)2. 验证用户名 preg_match('/^[a-z\d_]{5,20}$/i',$username)3. 验证电话号 阅读全文
posted @ 2013-04-01 15:50 忆殇之痕 阅读(127) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 下一页