12 2017 档案
摘要:1,添加表字段 alter table table1 add ptel varchar(100) not Null; alter table table1 add id int unsigned not Null auto_increment primary key; alter table tab
阅读全文
摘要:这里模拟表单登陆窗口 提交代码部分 1,生成session_id保存到 cookie $login_url = 'http://www.96net.com.cn/Login.php';$cookie_file = dirname(__FILE__)."/pic.cookie"; $ch = curl
阅读全文
摘要:1变量赋值 a=1 b=a b=1 a=3 b还是等于1 2,列表赋值 嵌套列表情况 如果想让列表单独出来怎么办呢 ,这时候用到copy 如果列表嵌套列表情况 还是一样的, 如果想深度copy import copy copy.deecopy()
阅读全文
摘要:都是计算机存储是二进制0101之类的数字 最早计算机在美国开始的 所以数字和英文之类的占用八位 2的8次方 256可以存储对于英文和数字戳戳有余 每个国家都有自己的编码 中国 gb2312 gbk gb1803 台湾 日本,韩国,都有对于的一张表表示字符,所以后来unicode 统一各国语言,uni
阅读全文
摘要:当一个用户用浏览器访问web(www.96net.com.cn)时候,若服务器开启session_start() 服务器tmp临时目录 自动生成session_id 并放回给创建一个cookie 保存sessionid (保存在浏览器中的,没有文件存放的),可以设置cookie过期时间 ,关闭浏览器
阅读全文
摘要:names="hello word" len() title() formate 格式化 split join find() replace() startswith() endswith() upper() lower() strip() lstrip() rstrip() index() isd
阅读全文
摘要:1定义 names=[] names=[1,2,1,1,1,] names=[1.'10'.[1,1]] 2添加元素 names.append() names.insert(0,10) names.extend([0,1]) 不能names.extend(1) 3删除元素 names.remove(
阅读全文
摘要:for x in range(10) python print(x)换行输出 for x in range(10) python print (x,end = '') 不换行输出
阅读全文
摘要:python 单行注释 #作为代表 python 多行注释 ‘’‘ 这是三个单引号注释 ’‘’ “”“ 这是三个双引号注释 ”“”
阅读全文
摘要:python模块 __name=='__main__' 用法1.ceshi_mod1.pydef test1(): print('111111')def test2(): print('2222')if __name__ =='__main__': test1()2.ceshi_mod2.py im
阅读全文
摘要:python 模块和包 简单说相当于命名空间 1,python 模块 python模块就是一个文件,里面有函数,变量等 import 模块 模块.方法 from 模块 import function from 模块 import * __name__ =='__main__' 是判断是自己运行模块还
阅读全文
摘要:MySQL修改表的语法 增加列[add 列名] ①alter table 表名 add 列名 列类型 列参数【加的列在表的最后面】 例:alter table test add username char(20) not null default ''; alter table test add b
阅读全文
摘要:linux mysql 数据库操作导入导出 数据表导出导入 1,数据库导入 mysql -uroot -p show databases; create database newdb; use 数据库; set names utf8; source /home/newdb.sql; 1.1 数据库导
阅读全文
摘要:linux php 中session默认file 假如修改为redis php.ini session.save_handler = "files"; session.save_path="tcp://127.0.0.1:6379" /etc/php-fpm.d/*.conf 这个地方也要改 ; S
阅读全文