是否可以创建一个 cron 作业,作为普通浏览器发送 $_SERVER['REQUEST_URI'] ?
因为当我做 /usr/bin/php -q __path_to 我的 php 文件____
我得到这样的东西
$_SERVER['SHELL']
$_SERVER['MAILTO']
$_SERVER['USER']
$_SERVER['PATH']
$_SERVER['LANG']
$_SERVER['SHLVL']
$_SERVER['HOME']
$_SERVER['LOGNAME']
$_SERVER['_']
$_SERVER['PHP_SELF']
$_SERVER['REQUEST_TIME_FLOAT']
$_SERVER['REQUEST_TIME']
但是当我从浏览器运行时,我会得到更多的东西
$_SERVER['CONTEXT_DOCUMENT_ROOT']
$_SERVER['CONTEXT_PREFIX']
$_SERVER['DOCUMENT_ROOT']
$_SERVER['GATEWAY_INTERFACE']
$_SERVER['HTTP_ACCEPT']
$_SERVER['HTTP_ACCEPT_ENCODING']
$_SERVER['HTTP_ACCEPT_LANGUAGE']
$_SERVER['HTTP_CONNECTION']
$_SERVER['HTTP_COOKIE']
$_SERVER['HTTP_HOST']
$_SERVER['HTTP_USER_AGENT']
$_SERVER['PATH']
$_SERVER['QUERY_STRING']
$_SERVER['REDIRECT_STATUS']
$_SERVER['REMOTE_ADDR']
$_SERVER['REMOTE_PORT']
$_SERVER['REQUEST_METHOD']
$_SERVER['REQUEST_SCHEME']
$_SERVER['REQUEST_URI']
$_SERVER['SCRIPT_FILENAME']
$_SERVER['SCRIPT_NAME']
$_SERVER['SERVER_ADDR']
$_SERVER['SERVER_ADMIN']
$_SERVER['SERVER_NAME']
$_SERVER['SERVER_PORT']
$_SERVER['SERVER_PROTOCOL']
$_SERVER['SERVER_SIGNATURE']
$_SERVER['SERVER_SOFTWARE']
$_SERVER['UNIQUE_ID']
$_SERVER['PHP_SELF']
$_SERVER['REQUEST_TIME_FLOAT']
$_SERVER['REQUEST_TIME']
我也尝试过lynx和curl但它似乎没有这样做......
谢谢如果有人有答案