原创 【CakePHP1.3】_CakePHP注意事項
關於數據庫和 CakePHP 的一些注意事項: 表必須具有名爲 id 的主鍵。 如果表中包含 created 或 modified 列,CakePHP 就會在適當的時候自動填充字段。 表名應該爲複數(users、products、
原创 【CakePHP1.3】_Optional Configuration
There are three other items that can be configured. Most developers complete these laundry-list items, but they’re not
原创 【CakePHP1.3】_CakePHP Conventions
Controller Conventions Controller classnames are plural, CamelCased, and end in Controller. PeopleController and Latest
原创 【PHP】代碼的優化
1.如果一個方法可靜態化,就對它做靜態聲明。速率可提升至4倍。 2.echo 比 print 快。 3.使用echo的多重參數(譯註:指用逗號而不是句點)代替字符串連接。 4.在執行for循環之前確定最大循環數,不要每循環一次