__FILE__ $_SERVER['PHP_SELF'] $_SERVER['SCRIPT_NAME'] $_SERVER['SCRIPT_FILENAME'] 的区别

echo "";
echo "__FILE__:".__FILE__;echo "
";
echo "PHP-SELF:".$_SERVER['PHP_SELF'];echo "
";
echo "name:".$_SERVER['SCRIPT_NAME'];echo "
";
echo "filename:".$_SERVER['SCRIPT_FILENAME'];
echo "";

 

__FILE__:D:\AppServ\www\test_file\13\index.php
PHP-SELF:/test_file/13/index.php
name:/test_file/13/index.php
filename:D:/AppServ/www/test_file/13/index.php

 

转载于:https://www.cnblogs.com/feng12345/p/5529023.html

你可能感兴趣的:(__FILE__ $_SERVER['PHP_SELF'] $_SERVER['SCRIPT_NAME'] $_SERVER['SCRIPT_FILENAME'] 的区别)