注册 登录
编程论坛 ASP技术论坛

ASP生成静态问题路径问题.

故事人生 发布于 2010-05-22 21:07, 595 次点击
<!--#include file="CheckAdmin.asp"-->
<!--#include file="Admin_html_function.asp"-->
<%
if Instr(session("AdminPurview"),"|34,")=0 then
  response.write ("<br /><br /><div align=""center""><font style=""color:red; font-size:9pt; "")>&Auml;ú&Atilde;&raquo;&Oacute;&ETH;&sup1;&Uuml;&Agrave;í&cedil;&Atilde;&Auml;&pound;&iquest;é&micro;&Auml;&Egrave;¨&Iuml;&THORN;&pound;&iexcl;</font></div>")
  response.end
end if
Function htmll(mulu,htmlmulu,FileName,filefrom,htmla,htmlb,htmlc,htmld)
if mulu="" then mulu=""&SysRootDir&""
if htmlmulu="" then htmlmulu=""&SysRootDir&""
mulu=replace(mulu, "//", "/")
FilePath=Server.MapPath(mulu)&"\"&FileName
Do_Url="http://"
Do_Url=Do_Url&Request.ServerVariables("server_name")&htmlmulu&filefrom
Do_Url=Do_Url&"?"&htmla&htmlb&"&"&htmlc&htmld
strUrl=Do_Url
set objXmlHttp=Server.createObject("Microsoft.XMLHTTP")
objXmlHttp.open "GET",strUrl,false
objXmlHttp.send()
binFileData=objXmlHttp.responseBody
Set objXmlHttp=Nothing
set objAdoStream=Server.CreateObject("Adodb." & "Stream")
objAdoStream.Type=1
objAdoStream.Open()
objAdoStream.Write(binFileData)
objAdoStream.SaveToFile FilePath,2
objAdoStream.Close()
set objAdoStream=nothing
End Function
%>

本地安装IIS调试

D:\WWWWROOT

网站文件夹V10放在D:\WWWROOT里面
在IIS管理器里新建网站,指定D:\WWWROOT\V10为物理路径,设置绑定IP地址 127.0.0.1  端口83
可正常设置与修改网站,但生成静态出现
请求的 URL http://127.0.0.1:80/ProductList.asp?&  这里的端口应当是http://127.0.0.1:83/ProductList.asp?& 不知为何成80
物理路径 D:\wwwroot\ProductList.asp   (这里物理路径没有读对应当是D:\WWWROOT\V10\ProductList.asp才能正常生成静态)

最后可以生成的静态文件HTML,打开全是404无法找到文件的提示!!!!!!!!!

1 回复
#2
故事人生2010-05-23 16:13
版主大哥能帮忙查下原因,或有相同情况解决的朋友帮忙解答下吗?谢谢!!!!!!!!!!
1