当前位置: 首页 > 网络学院 > 服务端脚本教程 > ASP > ASP GetAbsolutePathName 方法

ASP
ASP Drive
ASP File
ASP Folder
ASP Dictionary
ASP ADO
ASP AdRotator
ASP BrowserCap
ASP Content Linking
ASP Content Rotator
ASP Quick Ref
ASP 摘要
ASP 实例

ASP GetAbsolutePathName 方法


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 315 ::
收藏到网摘: n/a

The GetAbsolutePathName method returns the complete path from the root of the drive for the specified path.
ASP GetAbsolutePathName 的作用是返回指定路径所在驱动器下的完整路径(即:绝对路径)

Syntax
语法

FileSystemObject.GetAbsolutePathName(path)

Parameter参数 Description描述
path Required. The path to change to a complete path
必要组件。用于获得一个完整的路径

Examples
举例

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

评论 (0) All

登陆 | 还没注册?