php $_server详细用法分析
argument result
php_self returns the path and filename of the current script
server_protocol returns the name and revision of the page-requested protocol
request_method returns the request method used to access the page
request_time returns the timestamp from the beginning of the request
document_root returns the root directory of the current script
http_referer returns the page address that referred to the current page
http_user_agent returns the user agent of the header from the current request
remote_addr returns the ip address of the current user
remote_port returns the port of the user's machine that is accessing the page
script_filename returns the absolute filename from the current script
script_name returns the path of the current script
获取用户的ip地址
);if( $address != null){ fwrite( $file, ip address: $address
);} if( $referer != null){ fwrite( $file, referer: $referer
); }fwrite( $file, browser: $browser
); fclose($file);
脚本显示方法
获取服务器时间
本文地址:
转载随意,但请附上文章地址:-)