上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 29 下一页
摘要: 1 #coding=utf-8 2 import MySQLdb 3 conn = MySQLdb.Connect(host = '127.0.0.1',port=3306,user='root',passwd='',db='test',charset='utf8') 4 cursor = con... 阅读全文
posted @ 2015-08-30 22:00 北京流浪儿 阅读(508) 评论(0) 推荐(0) 编辑
摘要: 1 #coding=utf-8 2 import MySQLdb 3 conn = MySQLdb.Connect(host = '127.0.0.1',port=3306,user='root',passwd='',db='test',charset='utf8') 4 cursor = con... 阅读全文
posted @ 2015-08-30 21:59 北京流浪儿 阅读(732) 评论(0) 推荐(0) 编辑
摘要: #coding=utf-8import MySQLdbconn = MySQLdb.Connect(host = '127.0.0.1',port=3306,user='root',passwd='',db='test',charset='utf8')cursor = conn.cursor()sq... 阅读全文
posted @ 2015-08-30 21:58 北京流浪儿 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 现在问题来了,如果INSERT多行记录, ON DUPLICATE KEY UPDATE后面字段的值怎么指定?要知道一条INSERT语句中只能有一个ON DUPLICATE KEY UPDATE,到底他会更新一行记录,还是更新所有需要更新的行。这个问题困扰了我很久了,其实使用VALUES()函数一切 阅读全文
posted @ 2015-08-13 15:12 北京流浪儿 阅读(164) 评论(0) 推荐(0) 编辑
摘要: $filepath = 'http://www.vip.com/down'; $fp = fopen($filepath,"r"); Header("Content-type: application/octet-stream"); Header("Accept-Ranges: bytes"); ... 阅读全文
posted @ 2015-08-02 12:39 北京流浪儿 阅读(1507) 评论(0) 推荐(0) 编辑
摘要: 1、下载$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "ftp://127.0.0.1/downtest.txt"); curl_setopt($ch, CURLOPT_HEADER,0); curl_setopt($ch, CURLOPT_RET... 阅读全文
posted @ 2015-08-02 12:38 北京流浪儿 阅读(1140) 评论(0) 推荐(0) 编辑
摘要: $post_data = array("username"=>"yuejide@163.com","password"=>"yuejide198225","remember"=>0); $data = http_build_query($post_data); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://www.imoo... 阅读全文
posted @ 2015-08-02 12:37 北京流浪儿 阅读(296) 评论(0) 推荐(0) 编辑
摘要: 1.cURL介绍cURL 是一个利用URL语法规定来传输文件和数据的工具,支持很多协议,如HTTP、FTP、TELNET等。最爽的是,PHP也支持 cURL 库。本文将介绍 cURL 的一些高级特性,以及在PHP中如何运用它。2.基本结构在学习更为复杂的功能之前,先来看一下在PHP中建立cURL请求... 阅读全文
posted @ 2015-08-02 12:36 北京流浪儿 阅读(286) 评论(0) 推荐(0) 编辑
摘要: MySQL的limit工作原理就是先读取n条记录,然后抛弃前n条,读m条想要的,所以n越大,性能会越差。一般的分页做法,测试耗时 10.961sSELECT*FROMv_history_dataLIMIT5000000,10优化后,测试耗时 1.943sSELECT*FROMv_history_da... 阅读全文
posted @ 2015-07-30 19:36 北京流浪儿 阅读(182) 评论(0) 推荐(0) 编辑
摘要: AutoLoading\loading<?phpnamespace AutoLoading;class Loadind { public static function autoload($className){ //根据PSR-O的第4点 把 \ 转换层(目录风格符)... 阅读全文
posted @ 2015-07-30 15:28 北京流浪儿 阅读(449) 评论(0) 推荐(0) 编辑
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 29 下一页