有沒有用過 fflush 函數官方解釋是這樣說的: Flushes the output to a fileThis function forces a write of all buffered output to the resource pointed to by the file handle.也就是說把檔案的寫入緩衝強行釋放輸出到檔案指標.http://php.net/manual/en/function.fflush.php但我發現 fwrite 在執行完之後,
我的配置現在是這樣的location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini # With php5-cgi alone: # fastcgi_pass 127.0.0.1:9000; # With php5-
現在有這樣兩個序列化後的值,一個來自於使用者,另一個來自於資料庫$a=a:2:{i:0;s:12:\"逛街購物\";i:1;s:6:\"旅遊\";}//來自於使用者的多選項$b=a:2:{i:0;s:12:\"逛街購物\";i:1;s:6:\"旅遊\";}//來自於資料庫的b欄位的儲存值現在我需要對使用者選擇的$a的值和資料庫$b的值進行比較,$a是多選。意思是要篩選出$b中包含$a的資料,我想的是用$b where in
這是一個多條件查詢拼接的語句if($sex and is_array($service)){ $values = implode("%' OR service LIKE '%",$service);$sql.=" and service like '%".$values."%' ";$sql.=" and sex='$sex'"; }現在存在一個問題,如果在這種條件下會產生的結果是:select * from dr_member_data where zsoff='是' and