global.asa中的常量

编程入门 行业动态 更新时间:2024-10-28 04:21:02
本文介绍了global.asa中的常量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我一直在尝试通过在global.asa中创建 常量(Const)来创建只读全局变量,但我似乎无法引用它们。 将它们粘贴在一个包含的工作正常,但似乎更具结构性 声音使用Application_OnStart。我是否尝试过不可能的事情,如果是这样的话,那么这是什么?

I''ve been trying to create read-only global variables by creating constants (Const) in my global.asa, but I can''t seem to reference them. Sticking them in an include works fine, but it seems more structurally sound to use Application_OnStart. Am I attempting the impossible, and if so, why?

推荐答案

2obvious在04二月写的2005年在microsoft.public.inetserver.asp.general: 2obvious wrote on 04 feb 2005 in microsoft.public.inetserver.asp.general: 我一直在尝试通过在全局创建常量(Const)来创建只读全局变量.asa,但我似乎无法引用它们。将它们粘贴在一个包含的工作正常,但在使用Application_OnStart时似乎更具结构性。我是否尝试过不可能,如果是这样,为什么? I''ve been trying to create read-only global variables by creating constants (Const) in my global.asa, but I can''t seem to reference them. Sticking them in an include works fine, but it seems more structurally sound to use Application_OnStart. Am I attempting the impossible, and if so, why?

使用应用程序变量。 常量是vbscript [或其他脚本]并随页面消亡。 - Evertjan。 荷兰。 (用我的电子邮件地址替换所有带点的十字架)

Use application variables. Constants are vbscript [or other script] and die with the page. -- Evertjan. The Netherlands. (Replace all crosses with dots in my emailaddress)

在global.asa中使用公共声明怎么样? (呃,可以 你使用带有常量的公共声明 - 不是Const声明 ?)从我读到的,Public不能使用在一个程序中, 所以我必须将它放在Application_OnStart之外,但它会在$ global.asa中继续... b / b What about using the Public declaration in the global.asa? (uh, Can you use a Public declaration with a constant--isn''t Const a declaration as well?) From what I read, Public cannot be used within a procedure, so I would have to put it outside Application_OnStart, but it would still be in the global.asa...

AFAIK你可以声明对象而不是VBScript常量.. 我的个人喜好是在我的所有ASP页面中包含一个文件 包含在tunrs中包含最常用的东西,如常量, UI实用程序,数据库访问等... 在每一页我可能包含更多有特殊需求的文件。 这样我通常只需关心一个包含文件...... Patrice - " 2obvious" < VA ******** @ hotmail>一个écritdansle message de news:11 ********************* @ o13g2000cwo.googlegro ups ... AFAIK you can declare objects but not VBScript constants.. My personal preference is to include a single file in all my ASP Pages that contains in tunrs includes the most frequently used stuff such as constants, UI utilities, database access etc... In each page I can include sometimes more files with very specialized needs. This way I generally just have to care about a single include file... Patrice -- "2obvious" <va********@hotmail> a écrit dans le message de news:11*********************@o13g2000cwo.googlegro ups... 我一直在尝试通过在global.asa中创建常量(Const)来创建只读全局变量,但我似乎无法引用它们。将它们粘贴在include中可以正常工作,但使用Application_OnStart似乎更具结构性。我是否尝试过不可能的事情,如果是这样,为什么? I''ve been trying to create read-only global variables by creating constants (Const) in my global.asa, but I can''t seem to reference them. Sticking them in an include works fine, but it seems more structurally sound to use Application_OnStart. Am I attempting the impossible, and if so, why?

更多推荐

global.asa中的常量

本文发布于:2023-10-30 08:17:46,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1542288.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:常量   global   asa

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!