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

ASP
ASP 介绍
ASP Install
ASP 语法
ASP 变量
ASP Procedures
ASP Forms
ASP Cookies
ASP Session
ASP Application
ASP #include
ASP Global.asa
ASP Send e-mail
ASP Response
ASP Request
ASP Application
ASP Session
ASP Server
ASP Error
ASP FileSystem
ASP TextStream

ASP GetAbsolutePathName 方法


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 301 ::
收藏到网摘: 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

登陆 | 还没注册?