- 201 月
-
比對條件反轉注意事項
當整個比對條件相反時,中間的串接條件,也必然相反。 寫程式時要留意,不要產生錯誤的反向邏輯 關鍵在於要確實理解 && 及 || 的有效魔力- Posted by admin Posted on 20 1 月 0 Comments Read More
- 191 月
-
strpos() 使用注意事項
在使用 strpos() 時,一定要先確保第二個參數不可以為空值, 不然就可能發生 Empty delimiter 的錯誤警告。- Posted by admin Posted on 19 1 月 0 Comments Read More
- 111 月
-
使用 PHPMailer 注意事項
在使用 PHPMailer 時,注意一定要檢查以下屬性是否正確設定 $mail->Sender - Posted by admin Posted on 11 1 月 0 Comments Read More
- 2912 月
-
如何在靜態頁引入動態判斷的區塊
一般這類的應用是在 ad, log, tracking, member real-time info, 動態內容靜態化處理等等… 雖然有即時更新的好處,但缺點就是多一個 js 請求,內容不利於 SEO,會操伺服器- Posted by admin Posted on 29 12 月 0 Comments Read More
- 2512 月
-
CURLOPT_POSTFIELDS 和 http_build_query 使用注意事項
當使用 http_build_query 轉換設置 CURLOPT_POSTFIELDS 時, 最好明確設定 http_build_query 第三個參數為 &,以避免被環境設定因素影響。- Posted by admin Posted on 25 12 月 0 Comments Read More
- 288 月
-
json_encode() 使用注意事項之一
PHP 的 json_encode() 非常好用,很適合拿來與 JavaScript 協同運作, 例如直接將資- Posted by admin Posted on 28 8 月 0 Comments Read More