08c12-1.php

来自「介绍PHP5的给类型函数应用」· PHP 代码 · 共 15 行

PHP
15
字号
<?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 + =
减小字号Ctrl + -
显示快捷键?