■作者:痞子何 [2007/7/13 14:48:32]
请教周大哥. function sqlstr(sqlstring) if instr(sqlstring,"'")<>0 then sqlstr=replace(sqlstring,"'","'") else sqlstr=sqlstring end if sqlstr = Replace(sqlstr,vbnewline, "") sqlstr = Replace(sqlstr, CHR(34), """") sqlstr = Replace(sqlstr, CHR(13), "") sqlstr = Replace(sqlstr, CHR(10), "") sqlstr = replace(sqlstr, ">", ">") sqlstr = replace(sqlstr, "<", "<") end function 请教这是什么意思..???我不知道它的用法.. CHR(10)表示换行,CHR(13)表示回车,CHR(32)表示空格 整理意思是什么.?谢谢 [此帖子已被 痞子何 在 2007-7-13 15:20:00 编辑过]
【回复/版区/上篇/下篇/发贴/仅文字/HTML】 |
post = replace(post,chr(32)," ") post=replace(post,"<","< ") post = replace(post,chr(13),"<br>") post=replace(post,"[font ","<font ") post=replace(post,"","</font>") post=replace(post,"size=","size=2 ") post=replace(post,"","<B>") post=replace(post,"","</B>") post=replace(post,"","<I>") post=replace(post,"","</I>") post=replace(post,"","<U>") post=replace(post,"","</U>") post=replace(post,"[img]","<img src=") post=replace(post,"[/img]",">") post=replace(post,"[iframe]","<iframe src=") post=replace(post,"[/iframe]"," width=550 height=300>") post=replace(post,":)","<img src=images/icon1.gif>") 那么这样写对吗???如果对的话,那 代码里 font 语法部分不对呢?您请看, 比如:[font size=2 ]中的"[font "转换成"<font "后是会因为没有处理font size=2 ]中的“]”号造成生成的语句缺少font语法的右半边的“>”号,导致无法转换成一个完整的<font size=2> ,是要出错的啊,该怎么解决呢?
|