08 2015 档案
摘要:1 #coding=utf-8 2 import sys 3 import MySQLdb 4 5 class TransferMoney(object): 6 def __init__(self,conn): 7 self.conn = conn 8 9 #检...
阅读全文
摘要: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...
阅读全文
摘要: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...
阅读全文
摘要:#coding=utf-8import MySQLdbconn = MySQLdb.Connect(host = '127.0.0.1',port=3306,user='root',passwd='',db='test',charset='utf8')cursor = conn.cursor()sq...
阅读全文
摘要:现在问题来了,如果INSERT多行记录, ON DUPLICATE KEY UPDATE后面字段的值怎么指定?要知道一条INSERT语句中只能有一个ON DUPLICATE KEY UPDATE,到底他会更新一行记录,还是更新所有需要更新的行。这个问题困扰了我很久了,其实使用VALUES()函数一切
阅读全文
摘要:$filepath = 'http://www.vip.com/down'; $fp = fopen($filepath,"r"); Header("Content-type: application/octet-stream"); Header("Accept-Ranges: bytes"); ...
阅读全文
摘要: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...
阅读全文
摘要:$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...
阅读全文
摘要:1.cURL介绍cURL 是一个利用URL语法规定来传输文件和数据的工具,支持很多协议,如HTTP、FTP、TELNET等。最爽的是,PHP也支持 cURL 库。本文将介绍 cURL 的一些高级特性,以及在PHP中如何运用它。2.基本结构在学习更为复杂的功能之前,先来看一下在PHP中建立cURL请求...
阅读全文