1.文件上傳
RFC1867協議詳細介紹:
http://blog.csdn.net/xiaoxiaohai123/article/details/2538857php
<form action="2.php" method="post" enctype="multipart/form-data" >
name:<input type='text' name='user' />
name:<input type='text' name='password' />
file:<input type='file' name='zsw' />
<input type='submit' value="提交"/>
</form>css
表單上傳的頭:html
2.http EXTENSION-----webdav
web
3.xmlrpcrestful
4.restful函數
5.php錯誤日誌記錄
1.記錄到指定的文件
error_log($msg,3,$file) 將日誌記錄到$file中.post
1: Class log {
2: //
3: const USER_ERROR_DIR = '/home/site/error_log/Site_User_errors.log';
4: const GENERAL_ERROR_DIR = '/home/site/error_log/Site_General_errors.log';
5:
6: /*
7: User Errors...
8: */
9: public function user($msg,$username)
10: {
11: $date = date('d.m.Y h:i:s');
12: $log = $msg." | Date: ".$date." | User: ".$username."\n";
13: error_log($log, 3, self::USER_ERROR_DIR);
14: }
15: /*
16: General Errors...
17: */
18: public function general($msg)
19: {
20: $date = date('d.m.Y h:i:s');
21: $log = $msg." | Date: ".$date."\n";
22: error_log($msg." | Tarih: ".$date, 3, self::GENERAL_ERROR_DIR);
23: }
24: }
25: $log = new log();
26: $log->user($msg,$username); //use for user errors
2.記錄到php.ini指定的目錄:
error_log("$str); //默認到指定目錄
If status is a string, this function prints the status just before exiting. this
If status is an integer, that value will be used as the exit status and not printed. Exit statuses should be in the range 0 to 254, the exit status 255 is reserved by PHP and shall not be used. The status 0 is used to terminate
spa