当前位置: 首页 > 网络学院 > 服务端脚本教程 > ASP > ASP GetAbsolutePathName 方法
The GetAbsolutePathName method returns the complete path from the root of the drive for the specified path.
ASP GetAbsolutePathName 的作用是返回指定路径所在驱动器下的完整路径(即:绝对路径)
FileSystemObject.GetAbsolutePathName(path) |
Parameter参数 | Description描述 |
---|---|
path | Required. The path to change to a complete path 必要组件。用于获得一个完整的路径 |
Assume that the current directory is c:temptest: Example 1 <% dim fs,path set fs=Server.CreateObject("Scripting.FileSystemObject") path=fs.GetAbsolutePathName("c:") response.write(path) %> Output: c:temptest Example 2 <% dim fs,path set fs=Server.CreateObject("Scripting.FileSystemObject") path=fs.GetAbsolutePathName("mydoc.txt") response.write(path) %> Output: c:temptestmydoc.txt Example 3 <% dim fs,path set fs=Server.CreateObject("Scripting.FileSystemObject") path=fs.GetAbsolutePathName("privatemydoc.txt") response.write(path) %> Output: c:temptestprivatemydoc.txt |