02 2013 档案
摘要:php逐行读取txt文件内容ReadTxt.php文件<?php$handle = @fopen("./cont.txt", "r");$arr = array();if ($handle) { while (!feof($handle)) { $item = fgets($handle, 4096); $arr[] = $item; } fclose($handle); header("Content-type:text/html;charset=utf-8"); echo"<pre>"; pr
阅读全文
摘要:获取客户端IP:print_r($_SERVER['REMOTE_ADDR']);如果记不住IP的键名,可以打印出$_SERVER后查找获取指定网站IP(服务器端IP):$ip = gethostbyname('www.baidu.com');echo $ip;
阅读全文

浙公网安备 33010602011771号