是否可以在.asp文件中的VBScript块中运行php代码?

是否可以在.asp文件中的VBScript块中运行php代码?

问题描述:

Is it possible to run some php code in a VBScript block in a .asp file?

Something like:

<%@ LANGUAGE="VBSCRIPT" %>
<%
Set str = <?php $s = "hello world"; echo $s; ?>
%>

Thanks

That will not work.

But classic ASP and VBScript is a combination that is similar to PHP.
See classic ASP reference.

The code in your question will look like

<%@ LANGUAGE="VBSCRIPT" %>
<%
s = "hello world"
Response.Write(s)
%>