Parse PHP to obtain the implementation code of the current website and domain name. Copy the code as follows :? Obtain the current domain name: echo $ _ SERVER [SERVER_NAME]; obtain the source URL, that is, click the previous page URL echo $ _ SERVER [HTTP_REFERER]; $ _ SERVE
The code is as follows:
// Obtain the current domain name:
Echo $ _ SERVER ['server _ name'];
// Obtain the source URL, that is, click the previous URL on this page.
Echo $ _ SERVER ["HTTP_REFERER"];
$ _ SERVER ['request _ URI ']; // Obtain the suffix of the current domain name
$ _ SERVER ['http _ host']; // Obtain the current domain name
Dirname (_ FILE _); // Obtain the physical path of the current FILE
Dirname (_ FILE _). "/../"; // Obtain the upper-level physical path of the current FILE
?>
The http://www.bkjia.com/PHPjc/327754.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/327754.htmlTechArticle code is as follows :? // Obtain the current domain NAME: echo $ _ SERVER ['server _ name']; // Obtain the source URL, click echo $ _ SERVER ["HTTP_REFERER"]; $ _ SERVE...