先读出数据到byte数组,然后添加你需要的数据: dim mfile as string mfile="你的文件路径" dim i as long i=filelen(mfile) dim buff() as byte redim buff(i-1) open mfile for binary as #1 get #1,,buff close #1 open mfile for binary as #1 put #1,,"<pre>" put #1,,buff put #1,,"</pre>" close #1
dim mfile as string
mfile="你的文件路径"
dim i as long
i=filelen(mfile)
dim buff() as byte
redim buff(i-1)
open mfile for binary as #1
get #1,,buff
close #1
open mfile for binary as #1
put #1,,"<pre>"
put #1,,buff
put #1,,"</pre>"
close #1