php取访客ip

$ip=$_SERVER["REMOTE_ADDR"];

php取用户ua

$ua=$_SERVER["HTTP_USER_AGENT"];

php取网站跟目录

$path=$_SERVER['DOCUMENT_ROOT'];