Directory structure:
--F:websitewebgisindex.php
Test code: index.php
echo "<br>测试输出__FILE__"; echo "<br>".__FILE__; echo "<br>".dirname(__FILE__);
Test output__FILE__
F:websitewebgisindex.php
F:websitewebgis
Summary: __FILE__ outputs the path of the current file. In the case of include(index.php), the output path is also F:websitewebgisindex.php.
The above introduces the PHP predefined constant __FILE__, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.