摘要: public function export(){ set_time_limit(1000); // header("Content-type: text/html; charset=utf-8"); $a = file_get_contents('http://chuangye.yjbys.com/zhengce/'); $reg = '/(.*... 阅读全文
posted @ 2017-03-02 16:48 飞翔的小鸟11 阅读(2785) 评论(0) 推荐(1) 编辑
摘要: 1、echo 比 print 快。 2、尽量避免使用__get,__set,__autoload。 3、$row[‘id’]的效率是$row[id]的7倍。 4、尽量采用大量的PHP内置函数。 5、str_replace函数比preg_replace函数快,但strtr函数的效率是str_repla 阅读全文
posted @ 2017-03-02 16:46 飞翔的小鸟11 阅读(201) 评论(0) 推荐(0) 编辑
摘要: (1)mysql_real_escape_string -- 转义 SQL 语句中使用的字符串中的特殊字符,并考虑到连接的当前字符集 使用方法如下: 使用 mysql_real_escape_string() 作为用户输入的包装器,就可以避免用户输入中的任何恶意 SQL 注入。 (2) 打开magi 阅读全文
posted @ 2017-03-02 16:16 飞翔的小鸟11 阅读(581) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-03-02 15:14 飞翔的小鸟11 阅读(125) 评论(0) 推荐(0) 编辑
摘要: \n"; } else { $msg="GET /?login&username=lapiaotuan22&password=oyhz123456 HTTP/1.0\r\n"; $msg.="Host:passport.baidu.com \r\n"; $msg.="Referer: http://passport.baidu.com/ \r\n"; $msg.="Client-IP: 202... 阅读全文
posted @ 2017-03-02 15:11 飞翔的小鸟11 阅读(245) 评论(0) 推荐(0) 编辑
摘要: 1. 平时做网站经常要用正则表达式,下面是一些讲解和例子,仅供大家参考和修改使用:2. "^\d+$" //非负整数(正整数 + 0) 3. "^[0-9]*[1-9][0-9]*$" //正整数 4. "^((-d+)|(0+))$" //非正整数(负整数 + 0)5. "^-[0-9]*[1-9 阅读全文
posted @ 2017-03-02 14:45 飞翔的小鸟11 阅读(186) 评论(0) 推荐(0) 编辑