zoukankan      html  css  js  c++  java
  • 美国godaddy服务器,生成html网页出错,Microsoft VBScript runtime error '800a0005'

    Microsoft VBScript runtime error '800a0005'  

    Invalid procedure call or argument  

    /admin456/html_makeflash.asp, line 76  

    以上为提示错误,以下为我程序代码
    set rs=server.createobject("adodb.recordset")
    rs.open ("select show from mb"),conn,1,1
    pencat=rs("show")
    rs.close

    pencat=replace(pencat,"webname",webname)

    Set fso = Server.CreateObject("Scripting.FileSystemObject")
    Set fout = fso.CreateTextFile(server.mappath("../flash/"&request("id")&".htm")) '第76行
    fout.Write pencat   (这一句报错)
    fout.close

    response.write "生成成功《"&flashname&"》"

    ===============================================================解决办法

    解决方法--------------------------
    1、 在所有包含asp代码的页面(即所有的*.asp文件)的第1行加入如下代码:<%@ codepage="936" %>
      如果第1行是<%@ LANGUAGE="VBscript" %>,则把第1行改为:<%@ codepage="936" LANGUAGE="VBscript" %>
      936是简体中文的代码页,可以保证asp动态生成的内容不变乱码。

    2、 再次检查所有文件,确保在<head>和</head>之间有这样一句:
      <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
      gb2312是简体中文的默认编码,这样能保证你页面的静态内容不变乱码

    3、Set fout = fso.CreateTextFile(server.mappath("../flash/"&request("id")&".htm"),true,true)   
      第2参数设置为true表示以Unicode方式创建   
      如果还不行,顺便将这句改成这样试试fout.WriteLine pencat   

  • 相关阅读:
    【探路者】Postmortem会议(“事后诸葛亮”会议)
    软件工程第八次作业——例行报告
    感谢
    【探路者】Postmortem会议(“事后诸葛亮”会议)
    软件工程第七次作业——例行报告
    PSP总结报告
    第十二周软件工程作业-每周例行报告
    第十一周软件工程作业-每周例行报告
    感谢Thunder团队
    第十周软件工程作业-每周例行报告
  • 原文地址:https://www.cnblogs.com/smallmuda/p/1707410.html
Copyright © 2011-2022 走看看