Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/visual-studio/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
有没有办法使用asp变量在html中包含文件?_Html_Asp Classic_Include - Fatal编程技术网

有没有办法使用asp变量在html中包含文件?

有没有办法使用asp变量在html中包含文件?,html,asp-classic,include,Html,Asp Classic,Include,我想在html中包含一个文件,但我想使用asp(即)传递一个变量 IIS不支持变量 看 一种解决方法是将文件(使用FileSystemObject)读入变量,然后使用

我想在html中包含一个文件,但我想使用asp(即)传递一个变量

IIS不支持变量


一种解决方法是将文件(使用
FileSystemObject
)读入变量,然后使用



一种解决方法是将文件(使用
FileSystemObject
)读入一个变量,并使用

将其直接输出到页面。您是否希望这样做

<% if condition Then %>
<!--#include file="File1.htm"-->
<% elseif condition Then %>
<!--#include file="File2.htm"-->
<% end if %>

您喜欢这项工作吗

<% if condition Then %>
<!--#include file="File1.htm"-->
<% elseif condition Then %>
<!--#include file="File2.htm"-->
<% end if %>

这个怎么样

<% Server.Execute "" & s & ".html" %>

这个怎么样

<% Server.Execute "" & s & ".html" %>