S 0en access file path s 1en flexible application s 2en__
- 2020-05-30 19:40:58
- OfStack
S 1en__, is the full path and file name of the return file. If used in an include file, the include file name is returned. Starting with PHP 4.0.2, s = s = s = s = s = s = s = s = s = s = s = s = s = s = s = s = s = s = s = s = s = s = s = s = s = s S 4en (s 5en__), returning part of the current file path, that is, removing the file name.
Demo code:
<?php
// Gets the current path to the file + The file name
echo __FILE__;
echo '<BR>';
// Gets the current path to the file
echo dirname(__FILE__);
echo '<BR>';
// Gets on the file 1 Level directory path
echo dirname(dirname(__FILE__));
?>
Operation results:
D:\wamp\www\index.php
D:\wamp\www
D:\wamp
S: s: s: s: s: s: s: s: s: s: s: s: s: s: s: s: s: s: s: s: s: s: s: s: s: s: s: s: s: s: s: s: s: s: s: s: s: s: s: s: s: s: s: s: s: s: s: s.