Action构造函数在IIS FastCGI模式下需要修正$webRoot

3 views
Skip to first unread message

zhaoyi

unread,
Nov 21, 2009, 1:27:00 AM11/21/09
to kiwiphp
$webRoot = substr(dirname($_SERVER['SCRIPT_FILENAME']), strlen(realpath
($_SERVER['DOCUMENT_ROOT'])));

// windows系统目录使用\需要换成/
$webRoot = str_replace('\\','/',$webRoot);
Reply all
Reply to author
Forward
0 new messages