這裏是的這段有人可以解釋一下這個PHP代碼是做還是其目的
$thisFile = str_replace('\\', '/', __FILE__);
$docRoot = $_SERVER['DOCUMENT_ROOT'];
$webRoot = str_replace(array($docRoot, 'library/config.php'), '', $thisFile);
$srvRoot = str_replace('library/config.php', '', $thisFile);
,如果我保存到test.php的這是一個文件。我感到困惑的部分是str_replace是如何使$ webRoot值出來test.php
解決了神祕......嘆......人,如果你要發佈答案,至少讓它聽起來像一個... – Seb 2009-11-07 18:35:40