看板
[ PHP ]
討論串[請益] 關於於字串中辨別ip~~
共 3 篇文章
首頁
上一頁
1
下一頁
尾頁
內容預覽:
下列是從網路上找到的函式,不一定是最佳解,但可以參考. function validateIpAddress($ip){. //定義正規表示法規則. $rule = "/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/";. //正規表示法檢查IP. if(
(還有217個字)
內容預覽:
全部丟到 array 裡面:. $ip = array();. $ip[] = $log_id;. $result = array_unique($ip);. print_r($result);. echo count($result);. --. PHP MVC CodeIgniter 繁體中文手
(還有89個字)
首頁
上一頁
1
下一頁
尾頁