发新话题
打印

静态页面生成的问题

静态页面生成的问题

听说要改文件夹的权限,我找到FILE manager 进入修改,有很多用户的权限,我不知道修改哪个呀?
Administrators  
FPSE_18715  
FTP accounts (ftp_subaccounts)  
Plesk IIS User (IUSR_boxs1)  
Plesk IIS WP User (IWPD_690(boxs1))  
Plesk Domain User (boxs1)  
OWS_2672380511_admin  
INTERACTIVE  
NETWORK  
SYSTEM
索性我把所有用户权限都改了,不知道这样操作对不对?
在本地能正常运行的生成静态网页的ASP页面,在上传到空间之后不能正常打开,于是我加了“容错处理 On Error Resume Next".
这样页面可以正常打开了,也生成了静态网页
但是生成的静态网页都是空文件 0 kb。
之前在本地生成的时候还是可以的!
这是怎么回事呀?

TOP

你是什么程序?
愿与您一路同行

TOP

ASP+MSSQL

TOP

我是说你用的网站程序,是网上下载的吗?
愿与您一路同行

TOP

不是呀 自己写的,原来在国内主机上都是好用的

TOP

一般的程序都有设置静态化的说明文档,但你是自己写的程序,这个就不太清楚了
愿与您一路同行

TOP

版主 你给我留给邮箱或者QQ 我把我的这个页面发给你帮我看看 代码,行吗?

TOP

代码如下:
<%@ codepage="936" %>
<HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
</HEAD>
<!--#include file="../Include/Conn.asp"-->
<!--#include file="../Include/Replacer.asp"-->
<%
if request("gx")=1 then
min=request("min")
max=request("max")
if min="" and max="" then mysql=" order by id desc"
if min<>"" and max="" then mysql=" where id>="&min&" order by id desc"
if min="" and max<>"" then mysql=" where id<="&max&" order by id desc"
if min<>"" and max<>"" then mysql=" where id>="&min&" and id<="&max&" order by id desc"

'生成网址HTML页面
set fso = Server.CreateObject("Scripting.FileSystemObject")
set Rslist=server.createobject("adodb.recordset")
sql="SELECT * FROM news "&mysql
Rslist.open sql,conn,1,1   
i=0
while not Rslist.eof

set fw = fso.CreateTextFile(Server.MapPath("../../htmlwenzhang/wenzhang_"&Rslist(0)&".htm"),TRUE)  '若有则覆盖
'------------------------------------------------------------------------------------------

FTitle = Rslist("FTitle")
STitle = Rslist("STitle")
iTime = Rslist("Time")
Author = Rslist("Author")
Part = Rslist("Part")
Content = Rslist("Content")
ImgPath = Rslist("ImgPath")
SImgPath = Rslist("SImgPath")

fw.writeline("<html><head><meta http-equiv='Content-Language' content='zh-cn'><meta http-equiv='Content-Type' content='text/html; charset=gb2312'><Meta name='Kyewords'  Content=会'><title>"&FTitle&"|交友文章|</title><link href='../syccss.css' rel='stylesheet' type='text/css'></head><body  bgcolor='#ffffff' background='../image/footerbg.gif'><div align='center'><script language='javascript' src='../js/header2.js'></script></div><div align='center'><table border='0' width='846' id='table2' height='698' cellspacing='0' cellpadding='0' bgcolor='#FFFFFF'><tr><td height='1'></td></tr><tr><td align='right' valign='top' width='846'><table width='98%' border='0' cellpadding='0' cellspacing='0' id='table49'><tr><td class='bian_4lianghui' height='6' align='center'></td></tr><tr><td class='bian_4lianghui'><table align='center' border='0' cellspacing='0' cellpadding='0' width='98%' id='table50'><tr><td align='center' class='bian_4lianghui'>")
If FTitle <> "" Then
fw.writeline("<strong><font size='4'><div align='center'>"&FTitle&"</div></font></strong>")
End If
If STitle <> "" Then
fw.writeline("<strong><font size='2'><div align='center'>"&STitle&"</div></font></strong>")
End If
If iTime <> "" Then
fw.writeline("<div align='right'>发布时间:"&iTime&"</div>")
End If
If Content <> "" Then
fw.writeline("<script type='text/javascript'><!--")
fw.writeline("google_ad_client = 'pub-9918668709346760';")
fw.writeline("/* 728x90, 创建于 08-5-18 */")
fw.writeline("google_ad_slot = '6299714706';")
fw.writeline("google_ad_width = 728;")
fw.writeline("google_ad_height = 90;")
fw.writeline("//-->")
fw.writeline("</script>")
fw.writeline("<script type='text/javascript'")
fw.writeline("src='http://pagead2.googlesyndication.com/pagead/show_ads.js'>")
fw.writeline("</script>")
fw.writeline("<script src='http://busjs.vodone.cn/bus/ownerjs/advjs_36/36372/36372_91368_p7_.js'></script>")
fw.writeline("<div align='left'>"&TReplaceSinger(Content)&"</div>")
End If
If Part <>""  Then
fw.writeline("<div align='right'>摘自:"&Part&"</div>")
End If
If Author <> "" Then
fw.writeline("<div align='right'>作者:"&Author&"</div>")
End If
fw.writeline("<div align='center'>")
fw.writeline("<script type='text/javascript'><!--")
fw.writeline("google_ad_client = 'pub-9918668709346760';")
fw.writeline("/* 728x90, 创建于 08-5-18 */")
fw.writeline("google_ad_slot = '6299714706';")
fw.writeline("google_ad_width = 728;")
fw.writeline("google_ad_height = 90;")
fw.writeline("//-->")
fw.writeline("</script>")
fw.writeline("<script type='text/javascript'")
fw.writeline("src='http://pagead2.googlesyndication.com/pagead/show_ads.js'>")
fw.writeline("</script>")
fw.writeline("<a href='#' onClick='javascript:window.close();' class='line_t'>[ 关 闭 ]</a></div>")
fw.writeline("<script>document.write('<iframe src=http://code.linkpage.cn/i.html?id=89998&title='+document.title+' marginheight=0 marginwidth=0 frameborder=0 scrolling=no height=241 width=575 ></iframe>');</script></td></tr></table>")
fw.writeline("</td></tr></table></td></tr></table></td></tr></table><script language='javascript' src='../js/end2.js'></script></div></body></html>")

'------------------------------------------------------------------------------------------
fw.close
Rslist.movenext
wend
Rslist.close
set Rslist=nothing
conn.close
set conn=nothing
%>

<p align="center"> </p>
<p align="center"> </p>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="1" width="350" bgcolor="#FF0000" height="150">
    <tr>
      <td bgcolor="#F1E3F2">
                <p align="center">文章完成</p>
      </td>
    </tr>
</table>
</center>
</div>
<%else%>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<div align="center">
  <center>
  <table border="0" cellpadding="0" cellspacing="1" width="450" bgcolor="#FF0000">
    <tr>
      <td bgcolor="#F1E3F2">
        <p align="center" style="margin-top: 16">!文章生成!</p>
        <FORM name=form1 action=creatshowenzhang.asp?gx=1 method=post>
          <p align="center" style="margin-top: 16">从ID:<input type="text" name="min" size="20" value="1"></p>
          <p align="center" style="margin-top: 16">自ID:<input type="text" name="max" size="20" value="400"></p>
          <p align="center" style="margin-top: 16"><input type="submit" value="提 交" name="B1">
          <input type="reset" value="重写" name="B2"></p>
        </form>
        <p align="center"> </td>
    </tr>
  </table>
  </center>
</div>
<%
conn.close
set conn=nothing
end if%>

TOP

各位高手,能帮看看上面的代码有什么问题吗?
这个代码在国内的主机都是可以使用的,放在LP上出错

TOP

发新话题