中华文化网[www.b181.com]

2012 年 12 月 18 日4130

asp execute方法的作用是执行一个来自于其他asp文件内部的asp程序。当其他asp文件内的程序被请求执行完毕之后,控制器将返回最初发出请求的原始asp文件

syntax 语法

server.execute(path)

parameter参数

path

description描述

required. the location of the asp file to execute

必要参数。所请求执行的asp文件的本机地址。

example

举例

file1.asp:

<%

response.write("i am in file 1!<br />")

server.execute("file2.asp")

response.write("i am back in file 1!")

%>file2.asp:

<%

response.write("i am in file 2!<br />")

%>output:

i am in file 1!

i am in file 2!

i am back in file 1!

回过头来再看看server.transfer方法,你会发现,在“server.execute”和“server.transfer”方法之间存在着不同。

0 0