-1
$ranges = array('10.20.8.0-10.20.14.254', '192.168.0.2-192.168.0.254');
foreach ($ranges as $iprange) {
list($lowerip, $highip) = explode('-', $iprange);
$remoteip = ip2long($_SERVER['REMOTE_ADDR']);
if (ip2long($lowerip) <= $remoteip && $remoteip <= ip2long($highip)) {
}
}
在上面的例子中,你將如何解壓縮文件的所有字符串,並把它們放入數組?將文件中的所有字符串轉換爲數組?
$ranges = array('include file.txt)
只有給我的錯誤。你會如何糾正它看起來像我上面的?
你試圖尋找到的(http://php.net/manual/en/ref.filesystem.php) – Gordon