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 阅读全文
posted @ 2013-02-28 20:52 我叫龙弟弟 阅读(4912) 评论(0) 推荐(0)
摘要:获取客户端IP:print_r($_SERVER['REMOTE_ADDR']);如果记不住IP的键名,可以打印出$_SERVER后查找获取指定网站IP(服务器端IP):$ip = gethostbyname('www.baidu.com');echo $ip; 阅读全文
posted @ 2013-02-27 19:21 我叫龙弟弟 阅读(150) 评论(0) 推荐(0)