摘要: 1.sudo apt-get install apache2 sudo apt-get install php5 sudo apt-get install libapache2-mod-php5sudo apt-get install libapache2-mod-auth-mysql sudo /etc/init.d/apache2 restartsudo apt-get install libapache2-mod-python apt-get remove --purge apache2.2-common, 阅读全文
posted @ 2013-12-03 17:10 画家与我 阅读(111) 评论(0) 推荐(0) 编辑
摘要: urllib.unquote()字符串被当作url提交时会被自动进行url编码处理,在python里也有个urllib.urlencode的方法,可以很方便的把字典形式的参数进行url编码。可是在分析httpheaders的传输信息时,很多已经被url编码的字符串,不是我们这些菜鸟一眼能看出来的,于是乎,urllib.unquote()s ="url=%2F&email=imtesting%40tempmail.com&password=hereispassword"print urllib.unquote(s)>>> url=/& 阅读全文
posted @ 2013-12-03 16:05 画家与我 阅读(435) 评论(0) 推荐(0) 编辑
摘要: python中对文件、文件夹(文件操作函数)的操作需要涉及到os模块和shutil模块。得到当前工作目录,即当前Python脚本工作的目录路径:os.getcwd()返回指定目录下的所有文件和目录名:os.listdir()函数用来删除一个文件:os.remove()删除多个目录:os.removedirs(r“c:\python”)检验给出的路径是否是一个文件:os.path.isfile()检验给出的路径是否是一个目录:os.path.isdir()判断是否是绝对路径:os.path.isabs()检验给出的路径是否真地存:os.path.exists()返回一个路径的目录名和文件名:os 阅读全文
posted @ 2013-12-03 12:55 画家与我 阅读(176) 评论(0) 推荐(0) 编辑