PHP PHP:服务器变量列表
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PHP PHP:服务器变量列表相关的知识,希望对你有一定的参考价值。
//Information about the Server we're on
echo "SERVER_NAME: " . $_SERVER['SERVER_NAME'] . "<br />";
echo "SERVER_ADDR: " . $_SERVER['SERVER_ADDR'] . "<br />";
echo "SERVER_PORT: " . $_SERVER['SERVER_PORT'] . "<br />";
echo "<br /><br />";
//Where are all the files located
echo "DOCUMENT_ROOT: " . $_SERVER['DOCUMENT_ROOT'] . "<br />";
//Path on the URL Address bar
echo "PHP_SELF: " . $_SERVER['PHP_SELF'] . "<br />";
//Path on the filesystem
echo "SCRIPT_FILENAME: " . $_SERVER['SCRIPT_FILENAME'] . "<br />";
//Request details
echo "REMOTE_ADDR: " . $_SERVER['REMOTE_ADDR'] . "<br />";
echo "REMOTE_Port: " . $_SERVER['REMOTE_PORT'] . "<br />";
echo "REQUEST_URI: " . $_SERVER['REQUEST_URI'] . "<br />";
echo "QUERY_STRING: " . $_SERVER['QUERY_STRING'] . "<br />";
echo "REMOTE_METHOD: " . $_SERVER['REQUEST_METHOD'] . "<br />";
echo "REMOTE_TIME: " . $_SERVER['REQUEST_TIME'] . "<br />";
//Who referred them to our website (YAHOO? GOOGLE?)
echo "HTTP_REFERER: " . $_SERVER['HTTP_REFERER'] . "<br />";
//Statistics
echo "HTTP_USER_AGENT: " . $_SERVER['HTTP_USER_AGENT'] . "<br />";
以上是关于PHP PHP:服务器变量列表的主要内容,如果未能解决你的问题,请参考以下文章
php超级变量
php超级全局变量
PHP:基于下拉列表的 MySQL 值调用
php 获取所有用户定义的变量的列表
如何在html上使用php数组变量输出一个ul列表?
PHP获取当前URL路径的处理(适用于多条件筛选列表)