一段代码搞定,TXT是保存到当前目录
本文链接:https://www.dnwfb.com/1520.html,转载请注明出处。header('Content-type: text/html; charset=utf-8');
$time = date('Y-m-d H:i:s',time());
$ip = $_SERVER["REMOTE_ADDR"];
$ua = $_SERVER["HTTP_USER_AGENT"];
$file = fopen("pv.txt", "a+");
fwrite( $file, "($time|$ip|$ua)/r/n");
评论0