网络编程
位置:首页>> 网络编程>> Asp编程>> 如何解决从文本文件中调出记录出现丢失换行的问题?

如何解决从文本文件中调出记录出现丢失换行的问题?

 来源:asp之家 发布时间:2009-12-03 20:25:00 

标签:换行,文本,问题

从文本文件中调出记录出现丢失换行?

解决方法:

<%
Dim fs
Dim ts
set fs=Server.CreateObject("Scripting.FileSystemObject")
set ts=fs.CreateTextFile("C:\aspxhome.com.txt")
Do while Not RS.EOF
ts.Writelen(WU ("Xiaotao"))
RS.Movenext
Loop
ts.Close
fs.Close
%>

再用ADO来读数据库,即可解决这个问题:  

<%
Dim sContent
sContent= WU  ("Xiaotao")
sContent=Replace(sContent,Chr(13) & Chr(10),"<Br>")
Response.Write(sContent)
%>

0
投稿

猜你喜欢

手机版 网络编程 asp之家 www.aspxhome.com