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

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 AddHeader 方法


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

The AddHeader method adds a new HTTP header and a value to the HTTP response. 
AddHeader指令是向HTTP响应中添加一个新的HTTP标题以及一个值。

Note: Once a header has been added, it cannot be removed.
注意:当标题一旦被填加进去,他将无法删除。

Note: In IIS 4.0 you have to call this method before any output is sent to the browser. In IIS 5.0 you can call the AddHeader method at any point in the script, as long as it precedes any calls to the response.Flush method.
注意:在IIS4.0版本中,你必须在结果发送至浏览器之前使用这个指令;在IIS5.0中,只要在Response.Flush指令之前的任何脚本中,都可以使用AddHeader指令。

Syntax
语法

response.AddHeader name,value

Parameter
参数
Description
描述
name Required. The name of the new header variable (cannot contain underscores)
必用参数. 设定标题变量名称(不能含有下划线“_”)
value Required. The initial value of the new header variable
必用参数. 设定标题变量的初始值

Examples
举例

<%Response.AddHeader "WARNING","Error message text"%>

评论 (0) All

登陆 | 还没注册?