📄 08c12-1.php
字号:
<?php// Store a copy of our current file, making sure it uses forward slashes:$curdir = str_replace('\\', '/', __FILE__);// Store a copy of document root, ensuring forward slashes:$root = str_replace('\\', '/', $_SERVER['DOCUMENT_ROOT']);// As long as we haven't just done Document Root:while ($root !== $curdir) { // Remove one directory level from the current directory $curdir = dirname($curdir); // Try to include the file, hide any error: @include("{$curdir}/header.php"); }?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -