我无法解决这个问题! [英] I can't work it out!

查看:43
本文介绍了我无法解决这个问题!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我在这个问题上摸不着头脑,感觉不是很好。也许这里有人可以对此有所了解。我有两个.ASP

文件,(我们称之为file1.asp和file2.asp),它们都包含另一个在脚本标签中声明的
文件如下所示:


< SCRIPT LANGUAGE =''JavaScript''>

<! - #include file =''includes / include1。 asp'' - >


文件中还有一些.ASP代码不在函数中,或者在
中运行服务器。出于某种原因,我无法解决,包含文件中的.ASP

代码在file1.asp中包含时无法运行

但是有效它包含在file2.asp中时很好。但是,如果我调试

代码并进入file1.asp,那么包含的代码也会运行。什么是

在这里发生了什么?

Hi there,
I am scratching my head over this issue that does not make
sense. Maybe someone here can shed some light on it. I have two .ASP
files, (we''ll call them file1.asp and file2.asp) that both include another
file that is declared within a script tag like below:

<SCRIPT LANGUAGE=''JavaScript''>
<!-- #include file=''includes/include1.asp'' -->

There is also some .ASP code in the file that is not in a function or sub
that get run at the server. For some reason that I can''t work out, the .ASP
code in the included files does not get run when it is included in file1.asp
but works fine when it is included in file2.asp. If however, I debug the
code and I step into file1.asp then the included code also runs. What is
going on here?

推荐答案

根文件夹中的Includes文件夹是什么?

如果是这样使用虚拟而不是文件在包含声明中

" Waldy" < WA *** @ notmail.com>在消息中写道

新闻:e5 ************* @ TK2MSFTNGP03.phx.gbl ...
Is the Includes folder off of the root?
if so use "virtual" instead of "file" in the include statement
"Waldy" <wa***@notmail.com> wrote in message
news:e5*************@TK2MSFTNGP03.phx.gbl...
你好,我对这个没有意义的问题感到头疼。也许这里有人可以对此有所了解。我有两个.ASP
文件,(我们称之为file1.asp和file2.asp)都包含
另一个在脚本标签中声明的文件,如下所示:

< SCRIPT LANGUAGE =''JavaScript''>
<! - #include file =''includes / include1.asp'' - >

那里也是文件中的一些.ASP代码,它不在函数或子服务器中运行。由于某种原因,我无法解决,包含文件中的
..ASP代码在
file1.asp中包含时无法运行,但当它包含在file2中时工作正常.asp的。但是,如果我调试了
代码并进入file1.asp,那么包含的代码也会运行。
在这里发生了什么?
Hi there,
I am scratching my head over this issue that does not make
sense. Maybe someone here can shed some light on it. I have two .ASP
files, (we''ll call them file1.asp and file2.asp) that both include another file that is declared within a script tag like below:

<SCRIPT LANGUAGE=''JavaScript''>
<!-- #include file=''includes/include1.asp'' -->

There is also some .ASP code in the file that is not in a function or sub
that get run at the server. For some reason that I can''t work out, the ..ASP code in the included files does not get run when it is included in file1.asp but works fine when it is included in file2.asp. If however, I debug the
code and I step into file1.asp then the included code also runs. What is
going on here?



" Michael Kujawa" < nof at kujawas dot net>在消息中写道

news:en ************** @ TK2MSFTNGP04.phx.gbl ...
"Michael Kujawa" <nof at kujawas dot net> wrote in message
news:en**************@TK2MSFTNGP04.phx.gbl...
是否关闭了包含文件夹根部?
如果是这样使用虚拟而不是文件在包含声明中
Is the Includes folder off of the root?
if so use "virtual" instead of "file" in the include statement




您好,

感谢您的回复。 "内含"是一个根目录下的文件夹。

我会尝试你的建议,但它不解释为什么包含文件

代码只在我进入file1.asp时执行但是包含在

file2.asp中的代码工作正常。



Hi there,
thanks for replying. "Includes" is a folder off of the root.
I will try your suggestion, but it does not explain why the include files
code is only executed when I step into file1.asp but the code included in
file2.asp works fine.


你不需要一个脚本标记来包含一个asp页面

Include标签就足够了。


< SCRIPT LANGUAGE =''JavaScript''>

<! - #include file =''includes / include1.asp'' - >


你确实添加了< / script>在两个页面都正确或它

包含在include.asp中。 include1.asp实际上是

一个asp片段还是一个javascript片段?


如果一个javascript片段为什么要使用include语句呢?

< Script Language =''Javascript''src =" ./ includes / include1.asp" >

< / script>


" Waldy" < WA *** @ notmail.com>在消息中写道

news:uk ************** @ TK2MSFTNGP02.phx.gbl ...
Well you do not need a script tag to include an asp page
the Include tag is sufficient.

<SCRIPT LANGUAGE=''JavaScript''>
<!-- #include file=''includes/include1.asp'' -->

You did however add </script> on both pages correct or it
is contained within the include.asp. Is the include1.asp actually
an asp snippet or a javascript snippet?

If an javascript snippet why use an include statement at all?
<Script Language=''Javascript'' src="./includes/include1.asp" >
</script>


"Waldy" <wa***@notmail.com> wrote in message
news:uk**************@TK2MSFTNGP02.phx.gbl...
" Michael Kujawa" < nof at kujawas dot net>在消息中写道
新闻:en ************** @ TK2MSFTNGP04.phx.gbl ...
"Michael Kujawa" <nof at kujawas dot net> wrote in message
news:en**************@TK2MSFTNGP04.phx.gbl...
根文件夹中的Includes文件夹是什么?
如果是这样使用虚拟而不是文件在包含声明中
您好,
感谢您的回复。 "内含"是
Is the Includes folder off of the root?
if so use "virtual" instead of "file" in the include statement
Hi there,
thanks for replying. "Includes" is a folder off of the



root的文件夹。我会尝试你的建议,但它不解释为什么包含文件
代码只在我进入file1.asp时执行,但
file2.asp中包含的代码工作正常。


root. I will try your suggestion, but it does not explain why the include files
code is only executed when I step into file1.asp but the code included in
file2.asp works fine.



这篇关于我无法解决这个问题!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆