动网论坛,站长建站首选,国内使用量最多的论坛软件 动网论坛官方技术讨论区 站长工具 申请属于您自己的免费论坛
首页 | 新闻资讯 | 网站运营 | 网络编程 | 数据库 | 服务器 | 网页设计 | 图像媒体 | 网络应用 | 搜索优化 | 资源下载 | 动网主机 | DVBOX
    本站内  互联网 ASP论坛  ASP.Net论坛  PHP论坛
   Asp → 阅读文章

 Script Encoder 语法

作者来源: 
阅读 数 418 人次 , 2000-8-12 

  Script Encoder Syntax

SCRENC [/s] [/f] [/xl] [/l defLanguage ] [/e defExtension] inputfile outputfile

Argument
Description

/s
Optional. Switch that specifies that the script encoder is to work silently; that is, produce no screen output. If omitted, the default is to provide verbose output.

/f
Optional. Specifies that the input file is to be overwritten by the output file. Note that this option destroys your original input source file. If omitted, the output file is not overwritten.

/xl
Optional. Specifies that the <@language> directive is not added at the top of .asp files. If omitted, the <@language> directive is added for all .asp files.

/l defLanguage
Optional. Specifies the default scripting language (JScript or VBScript) to use during encoding. Script blocks within the file being encoded that do not contain a language attribute are assumed to be of this specified language. If omitted, JScript is the default language for HTML pages and scriptlets, while VBScript is the default for ASP. For plain text files, the file extension (either .js or .vbs) determines the default scripting language.

/e defExtension
Optional. Associates the input file with a specific file type. Use this switch when the input file's extension doesn't make the file type obvious; that is, when the input file extension is not one of the recognized extensions, but the file content does fall into one of the recognized types. There is no default for this option. If a file with an unrecognized extension is encountered and this option is not specified, the script encoder fails for that unrecognized file. Recognized file extensions are .asa, .asp, .cdx, .htm, .html, .js, .sct, and .vbs.

inputfile
Required. The name of the input file to be encoded, including any necessary path information relative to the current directory.

outputfile
Required. The name of the output file to be produced, including any necessary path information relative to the current directory.





--------------------------------------------------------------------------------

Figure 3   Encoding a Page



Public Sub EncodePage()
     ' Sample encoder
     ' Andrew Clinick Jan 1999
     ' Obviously this code could do with some error trapping etc
     ' but it should give you the basics to get started
     
     
     Dim strHTML As String
     ' Get the Frontpage document
     Dim mydoc As FPHTMLDocument
     ' Create a new instance of the scripting.encoder object
     Dim myEncoder As New Scripting.Encoder
     ' Get the current active document
     Set mydoc = ActiveDocument
     ' Get the HTML for the active document
     strHTML = mydoc.DocumentHTML
     ' Call the encodescriptfile method with the HTML
     strHTML = myEncoder.EncodeScriptFile(".htm", strHTML, 0, "")
     ' Set the documentHTML to be the return HTML with encoded script
     mydoc.DocumentHTML = strHTML
     ' We're done!
End Sub  
 本文Tags组网  
 收藏本文  打印本文  论坛讨论  关闭窗口
· 上一篇:ASP+与ASP有哪些区别(转)
· 下一篇:Microsoft 脚本编码器Script Encoder介绍(4)全中文
· 怎样把数据库结构显示出来的源代码
· 建立Web站点
· 一个用vc开发的域名查询组件(源代码及说明)
· 一些不长见的ASP调用存储过程的技巧
· 全正则的检测IP是否合法的函数


关于本站 | 联系我们 | 业务合作 | 客户案例 | 诚聘英才 | 广告合作 | 收藏本站
海口动网先锋网络科技有限公司版权所有
Copyright © 2000 - 2006 Cndw.Com
中华人民共和国电信与信息服务业务经营许可证编号 琼 ICP 020077