$php _self = isset ($_server[' php_self ')? $_server[' php_self ': $_server[' script_name '];if ('/' = = substr ($php _self,-1)) { $php _self. = ' index.php ';} Define (' Php_self ', $php _self);
If
Echo basename (php_self)
Display as: index.php
If
Echo basename (Php_self, '. PHP ')
Display as: Index
Articles you may be interested in
- PHP finds whether a value exists in the array (In_array (), Array_search (), array_key_exists ())
- PhpMyAdmin cannot start session without errors error resolution
- PHP Tip maximum execution time of seconds exceeded ... The wrong solution
- PHP fatal error allowed memory size of ... How memory-deficient errors should be resolved
- PHP string Escape function (Addslashes,stripslashes) detailed
- PHP tip php warning:date (): It is not safe to rely on the ... The wrong solution
- Usage and differences in PHP that jump out of multiple loops using Break,continue,goto,return,exit
- PHP string substitution function str_replace faster than preg_replace
http://www.bkjia.com/PHPjc/764199.html www.bkjia.com true http://www.bkjia.com/PHPjc/764199.html techarticle $php _self = isset ($_server[' php_self ') "$_server[' php_self ']: $_server[' script_name '];if ('/' = = substr ($php _ Self,-1)) {$php _self. = ' index.php ';} Define (' Php_self ', $php _self);