PHP / Web / Python
来源:互联网 发布:unity3d点击生成物体 编辑:程序博客网 时间:2024/06/06 21:38
==vim==
sudo save in vi:
:w !sudo tee %
==.htaccess==
http://support.hostgator.com/articles/general-help/apache-mod_rewrite-and-examples
# Redirect all pages from olddomain.com
# to newdomain.com
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.olddomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^olddomain.com$
RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,L]
OR=or, L=last rule
==Env==
BitNami for XAMPP: http://bitnami.com/stack/xampp?utm_source=bitnami&utm_medium=installer&utm_campaign=XAMPP%2BInstaller
==Env==
[2010-12-31T20:27:53+08:00] apache+php http://www.php.net/manual/en/install.windows.apache2.php Options +ExecCgi
[2011-01-04T19:45:39+08:00] In PHP 5.3.0 and above the MySQL-related database extensions use the MySQL Native Driver by default. you may want to set some preferences in php.ini depending on your requirements.
[2011-01-04T19:48:56+08:00] windows php.ini : extension_dir = "ext"
[2011-01-12T17:13:50+08:00] php xdebug: need enable socket
[2011-01-12T17:14:56+08:00] netbeans + php: http://wiki.netbeans.org/HowToConfigureXDebug#How_to_configure_xdebug_with_WAMP
[2011-01-12T22:15:29+08:00] Mediawiki + UCenter 1.5 + Discuz 7.0/7.1/7.2 : http://www.discuz.net/thread-1208570-1-1.html
[2011-01-15T14:44:56+08:00] define('var', 'value'); echo var;
define('v', 'value'); echo v;
[2011-01-15T23:13:48+08:00] dl dt dd
WLMP is an acronym, which stands for the first letters of Windows / LightTPD / MySQL / PHP.
http://en.wlmp-project.net/downloads.php?cat=wlmp
[2011-06-27T05:04:39+08:00] css, html, js IDE: http://www.aptana.com/downloads/start
[2011-01-22T22:55:18+08:00] source control: https://github.com/
[2011-06-27T05:08:01+08:00] Debugging Tool seems better than Fiddler: http://www.zendstudio.net/archives/charlas-web-debugging-proxy/#more-1365
--Eclipse--
Load & Run faster:
--launcher.XXMaxPermSize
756M
[2011-06-27T15:03:18+08:00] In Eclipse, go to Preferences>General>Workspace and select UTF-8 as the Text File Encoding
==Sample==
[2011-02-14T20:41:41+08:00] CSS Text: http://www.w3.org/TR/CSS21/text.html
[2011-05-11T17:39:37+08:00] http://skyje.com/2010/02/css-sprites/
==Projects==
[2011-01-19T22:59:31+08:00] online editor: CKEditor
[2011-01-09T20:00:48+08:00] http://en.wikipedia.org/wiki/Wikipedia:Spoken_articles
--My PHP Twitter API client--
Function: post/delete a tweet; list recent tweets; support mobile browser
Reference: Twitter API: Up and Running(click "Examples" to download the sample code)
<?php$file_folder = $_SERVER['DOCUMENT_ROOT'].'/t/';$files_php = array("index","index_do");foreach ($files_php as $file_php){$files[] = $file_folder.$file_php.'.php';}foreach($files as $file){$fp = fopen($file, 'r');$fp_out = fread($fp, filesize($file));echo '';echo htmlspecialchars($fp_out);echo '';}?>
==Python==
[2011-01-12T23:04:51+08:00] >>> import os
>>> os.listdir ("c:\\")
''' python
#need learning
Selenium、Robotium、Athrun、Café
LoadRunner、selenium、appscan、jmeter
# debugging
vars(v)
##file
In [98]: type(open("comm.py",'rb'))
Out[98]: _io.BufferedReader
In [97]: type(open("comm.py",'rb').read())
Out[97]: bytes
In [99]: type(open("comm.py",'r').read())
Out[99]: str
## soap
# save file:
html = soup.prettify("utf-8")
with open("output.html", "wb") as file:
file.write(html)
mydivs = soup.findAll("div", { "class" : "stylelistrow" })
## image
from PIL import Image
im = Image.open("lena.ppm")
im.show()
#error
OSError: cannot identify image file 'error.jpg'
## parsing
>>> import ast
>>> ast.literal_eval("{'muffin' : 'lolz', 'foo' : 'kitty'}")
{'muffin': 'lolz', 'foo': 'kitty'}
my_cookies = {'cookiename1': 'cookievalue1', 'cookiename2': 'cookievalue2'}
response = requests.get(
'http://www.steampowered.com/mystuff',
cookies=my_cookies)
'''
- PHP / Web / Python
- Web邮件发送客户端 [ html + php + python ]
- python版php web后门查杀小工具
- PHP结合Python的WEB开发技术 [ppython]
- php、python、ruby——web脚本语言的比较
- 分别使用Java,PHP,Python 进行web开发
- PHP调用python,shell命令执行成功,web运行失败
- PHP & WEB
- PHP Web
- PHP WEB
- python web
- python Web
- python-web
- python-web
- [Web开发] 6款著名的开源的Web开发框架横向评测 (Perl, PHP, Python, Ruby)
- .NET/JAVA/PHP/Python 企业级Web开发框架整合系列文章导航
- Python:HTTP请求模块(httplib/urllib,GET/POST,php),Web服务器模块
- 【python web学习】python web窥探
- Oscache 概述
- 对类及对类成员的访问权限
- 有向图的强联通分量
- Java中Runnable和Thread的区别
- jquery的each()详细介绍--转
- PHP / Web / Python
- Linux多线程中使用信号-1
- jsp图片没有上传没有缩略图,怎么回事
- JS克隆对象方法
- Lua5.1中数学库
- SOCKET_ERROR & INVALID_SOCKET & WSAGetLastError
- Linux 多线程应用中如何编写安全的信号处理函数
- 直接拿来用!最火的Android开源项目(一)
- cdh培训