php
- 最新
- 瀏覽
- 評論
php es 報錯 No alive nodes. All the 1 nodes seem to be down
php連接es時報錯No alive nodes. All the 1 nodes seem to be down,原因是Elasticsearch開啟了安全認證,查看服務器端響應信息為:received plaintext http traffic on&n...
php字符串壓縮工具
判斷字符串是否需要壓縮,然后再進行壓縮,需要優化的地方很多,比如把壓縮結果保存起來,避免執行2次,判斷是依賴于壓縮的結果大小和原始字符串的大小來判斷的,懶得處理了。代碼如下/** * 字符串壓縮工具 */ class CompressStrUtil...
php獲取下個月,下一年此刻的時間戳
獲取當前時間戳:$now = time();獲取下個月此刻的時間戳:$nextMonth = strtotime('+1 month');獲取下一年此刻的時間戳$nextYear = strtotime('+1 year');...
php運行報錯:Using $this when not in object context
php運行報錯:Using $this when not in object context以下是我的代碼:錯誤代碼實例:public static function getInfo() { // ....