[提问]
asp+ms sql数据库 godaddy生成的html页为什么是空白的?
|
|
wfbhdl
发表于 2008-9-18 17:51:19
|
显示全部楼层
问题的根本原因不在于xmlhttp和fso,而在于writeline(wstr)这个方法,writeline方法在utf-8服务器编码模式下只能写入英文,不能写入中文.
有什么办法能让writeline在utf-8的编码下写入中文呢? |
|
|
|
|
|
|
|
|
|
|
add.c
发表于 2008-9-19 10:00:26
|
显示全部楼层
|
|
|
|
|
|
|
|
|
|
wfbhdl
发表于 2008-9-19 12:44:39
|
显示全部楼层
原帖由 add.c 于 2008-9-19 10:00 AM 发表 
中文的都是空白,还是乱码?
空白,没有任何东西.经测试在国内是没有任何问题的,就是因为国外的服务器是utf-8编码.只要是中文就没法写入,我想这可能是论坛上有关这个问题的最根本的原因.在读取的时候设定chartset=gb2312可以读出中文来,但是就是在用writeline()写入的时候写不进中文去.
[ 本帖最后由 wfbhdl 于 2008-9-19 12:45 PM 编辑 ] |
|
|
|
|
|
|
|
|
|
|
add.c
发表于 2008-9-19 13:46:43
|
显示全部楼层
|
|
|
|
|
|
|
|
|
|
wfbhdl
发表于 2008-9-19 15:48:59
|
显示全部楼层
问题解决了.原来只需要改动一个地方即可:fs.CreateTextFile(server.MapPath(filepath),true,UTF-8)
这样writeline()方法就能写入godaddy的空间了.
感谢论坛上所有人特别是版主add.c的热心帮助. |
评分
-
查看全部评分
|
|
|
|
|
|
|
|
|
|
ivye
发表于 2008-9-19 17:22:27
|
显示全部楼层
楼主~~在不在啊~~加下QQ指点一下啊~谢了啊~~!
我的QQ:3900132
就是不知道怎么整MSSQL
[ 本帖最后由 ivye 于 2008-9-19 05:24 PM 编辑 ] |
|
|
|
|
|
|
|
|
|
|
add.c
发表于 2008-9-19 17:34:24
|
显示全部楼层
回复 26# 的帖子
一般电脑都可以装sql数据库2005的,可能是你的操作系统不能装数据库把。
sql server 2000也不可以装么? |
|
|
|
|
|
|
|
|
|
|
ivye
发表于 2008-9-19 18:23:12
|
显示全部楼层
请教楼主~!
你只要保证你在2000的表的用户名是dbo即可以了.
这是什么意思呢?
同时我的是MSSQL2005
有没有相关的教程可供参考呢? |
|
|
|
|
|
|
|
|
|
|
qjiqun
发表于 2008-12-1 19:28:43
|
显示全部楼层
我的问题与楼主类似www.gsdiy.com/web是以下代码修改吗?具体怎么改?
<!--#include file="char.asp"-->
<%
'set myfm2=Server.CreateObject("scripting.filesystemobject")
'myfilepath =Server.MapPath("propic")
'response.write myfilepath
'response.end
Set obj = Server.CreateObject("LyfUpload.UploadFile")
obj.maxsize=300720 '设置文件上传的最大为30720个字节(30K)
obj.extname="gif,jpg"
fileuperror=false
file1_yes=obj.filetype("pfname")
proname=obj.request("filetime")
'userid=obj.request("userid")
'myfilepath =Server.MapPath("propic")
'response.write myfilepath&"<br>"
'response.write proname&"<br>"
'response.write file1_yes&"<br>"
'response.end
'upload small pic
if file1_yes<>"" then
'set myfm=Server.CreateObject("scripting.filesystemobject")
myfilepath =Server.MapPath("newspic")
'filepath=filepath&"\propic"
'if not myfm.FolderExists(myfilepath) then
' myfm.CreateFolder(myfilepath)
'end if
mynpic=proname&".jpg"
NewFileName="pfname"
imgss=obj.SaveFile(NewFileName,myfilepath,true,mynpic)
if imgss="" then
Response.Write ("pic upload error!")
fileuperror=true
elseif imgss= "0" then
Response.Write ("product picture size too big!")
fileuperror=true
elseif imgss= "1" then
Response.Write ("product picture file must gif/jpg!")
fileuperror=true
end if
end if
%>
<SCRIPT language=JavaScript>
//window.location="img.asp"
window.close();
</SCRIPT> |
|
|
|
|
|
|
|
|
|
|
add.c
发表于 2008-12-2 09:57:02
|
显示全部楼层
回复 29# 的帖子
首先设置你的数据库和生成的目录有写权限
另外注意下这个目录 问题 myfilepath =Server.MapPath("newspic") |
|
|
|
|
|
|
|
|