__FILE__ $_SERVER['PHP_SELF'] $_SERVER['SCRIPT_NAME'] $_SERVER['SCRIPT_FILEN
Posted 夜深人静123
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了__FILE__ $_SERVER['PHP_SELF'] $_SERVER['SCRIPT_NAME'] $_SERVER['SCRIPT_FILEN相关的知识,希望对你有一定的参考价值。
echo "<strong>";
echo "__FILE__:".__FILE__;echo "<br/>";
echo "php-SELF:".$_SERVER[‘PHP_SELF‘];echo "<br/>";
echo "name:".$_SERVER[‘SCRIPT_NAME‘];echo "<br/>";
echo "filename:".$_SERVER[‘SCRIPT_FILENAME‘];
echo "</strong>";
__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
以上是关于__FILE__ $_SERVER['PHP_SELF'] $_SERVER['SCRIPT_NAME'] $_SERVER['SCRIPT_FILEN的主要内容,如果未能解决你的问题,请参考以下文章
PHP $_SERVER['SCRIPT_FILENAME'] 与 __FILE__ 的区别
php$_SERVER['SCRIPT_NAME']和__FILE__的区别
详解__FILE__与$_SERVER['SCRIPT_FILENAME']的区别