?
Dieses Dokument verwendet PHP-Handbuch für chinesische Websites Freigeben
GetAbsolutePathName 方法為指定路徑返回從根驅(qū)動器開始的完整路徑。
FileSystemObject.GetAbsolutePathName(path)
參數(shù) | 描述 |
---|---|
path | 必需的。需修改為完整路徑的路徑。 |
<%
dim fs,path
set fs=Server.CreateObject("Scripting.FileSystemObject")
path=fs.GetAbsolutePathName("c:")
response.write(path)
%>
輸出:
c:\temp\test
<%
dim fs,path
set fs=Server.CreateObject("Scripting.FileSystemObject")
path=fs.GetAbsolutePathName("mydoc.txt")
response.write(path)
%>
輸出:
c:\temp\test\mydoc.txt
<%
dim fs,path
set fs=Server.CreateObject("Scripting.FileSystemObject")
path=fs.GetAbsolutePathName("private\mydoc.txt")
response.write(path)
%>
輸出:
c:\temp\test\private\mydoc.txt