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   

  • 相关阅读:
    ceph pg pool
    linux 开放访问端口
    授予普通用户root权限
    ajax返回json中文是问号
    elasticseach 安装head
    python学习之路8
    JS正则表达式学习
    python学习之路7 前端学习4 jQuery 学习
    python学习之路7 前端学习3
    python 学习总结6 前端学习2
  • 原文地址:https://www.cnblogs.com/smallmuda/p/1707410.html
Copyright © 2011-2022 走看看