主题:  上传上去的时候为什么总是显示

micehui

职务:普通成员
等级:1
金币:0.0
发贴:28
注册:2003/11/4 11:08:56
#12003/11/24 17:46:50
上传上去的时候为什么总是显示:
-----------------------------------------

Microsoft VBScript runtime error '800a139a'

Unexpected quantifier

/bbs2/ubbcode.asp, line 9
-------------------------------------------------------------------------

而用winxp的站点管理测试则没有问题,为什么?



我有BLOG了

职务:普通成员
等级:4
金币:16.8
发贴:2209
注册:2003/1/22 2:08:39
#22003/11/24 18:03:54
第9行代码有错误,把文件的代码传上来看看!



micehui

职务:普通成员
等级:1
金币:0.0
发贴:28
注册:2003/11/4 11:08:56
#32003/11/25 10:40:00
第9行代码如下:

strContent=objRegExp.Replace(strContent,"<a href=""$2"" target=_blank><IMG SRC=""$5"" border=0 onload=""javascript:if(this.width>screen.width-366)this.width=screen.width-366""></a>")



micehui

职务:普通成员
等级:1
金币:0.0
发贴:28
注册:2003/11/4 11:08:56
#42003/11/25 15:31:47
能具体的说说怎么改吗,谢谢



micehui

职务:普通成员
等级:1
金币:0.0
发贴:28
注册:2003/11/4 11:08:56
#52003/11/26 8:40:50
我不知道哪一段要替换,能否指点一下,正则问题不太懂,555555



janlay

职务:管理员
等级:7
金币:28.0
发贴:7244
注册:2003/11/27 18:07:11
#62003/11/26 10:51:20
把 objRegExp.Pattern="xxxx" 那一行放在它前面你不会是抄漏了吧



micehui

职务:普通成员
等级:1
金币:0.0
发贴:28
注册:2003/11/4 11:08:56
#72003/11/26 13:19:22
没有抄渥!!整个ubb文件如下:

_________________________________

<%
function UBBCode(strContent)
dim objRegExp
Set objRegExp=new RegExp
objRegExp.IgnoreCase =true
objRegExp.Global=True
'带链接的图片(套用)
objRegExp.Pattern="(\[url\=)(http:\/\/\S+?)(\])(\[IMG\])(http:\/\/\S+?)(\[\/IMG\])(\[\/url\])"
strContent=objRegExp.Replace(strContent,"<a href=""$2"" target=_blank><IMG SRC=""$5"" border=0 onload=""javascript:if(this.width>screen.width-366)this.width=screen.width-366""></a>")
objRegExp.Pattern="(\[url\=)(http:\/\/\S+?)(\])(\[IMG\])(\S+?)(\[\/IMG\])(\[\/url\])"
strContent=objRegExp.Replace(strContent,"<a href=""$2"" target=_blank><IMG SRC=""http://$5"" border=0 onload=""javascript:if(this.width>screen.width-366)this.width=screen.width-366""></a>")
objRegExp.Pattern="(\[url\=)(\S+?)(\])(\[IMG\])(http:\/\/\S+?)(\[\/IMG\])(\[\/url\])"
strContent=objRegExp.Replace(strContent,"<a href=""http://$2"" target=_blank><IMG SRC=""$5"" border=0 onload=""javascript:if(this.width>screen.width-366)this.width=screen.width-366""></a>")
objRegExp.Pattern="(\[url\=)(\S+?)(\])(\[IMG\])(\S+?)(\[\/IMG\])(\[\/url\])"
strContent=objRegExp.Replace(strContent,"<a href=""http://$2"" target=_blank><IMG SRC=""http://$5"" border=0 onload=""javascript:if(this.width>screen.width-366)this.width=screen.width-366""></a>")
'url
objRegExp.Pattern="(\[URL\])(http:\/\/\S+?)(\[\/URL\])"
strContent= objRegExp.Replace(strContent,"<A HREF=""$2"" TARGET=_blank>$2</A>")
objRegExp.Pattern="(\[URL\])(\S+?)(\[\/URL\])"
strContent= objRegExp.Replace(strContent,"<A HREF=""http://$2"" TARGET=_blank>$2</A>")
objRegExp.Pattern="(\[URL\=)(http:\/\/\S+?)(\])(\S+?)(\[\/URL\])"
strContent= objRegExp.Replace(strContent,"<A HREF=""$2"" TARGET=_blank>$4</A>")
objRegExp.Pattern="(\[URL\=)(\S+?)(\])(\S+?)(\[\/URL\])"
strContent= objRegExp.Replace(strContent,"<A HREF=""http://$2"" TARGET=_blank>$4</A>")
'email
objRegExp.Pattern="(\[EMAIL\])(\S+\@\S+?)(\[\/EMAIL\])"
strContent= objRegExp.Replace(strContent,"<A HREF=""mailto:$2"">$2</A>")
objRegExp.Pattern="(\[EMAIL\=)(\S+\@\S+?)(\])(\S+?)(\[\/EMAIL\])"
strContent= objRegExp.Replace(strContent,"<A HREF=""mailto:$2"">$4</A>")

objRegExp.Pattern="(\[red\])(.+?)(\[\/red\])"
strContent=objRegExp.Replace(strContent,"<FONT COLOR=""#ff0000"">$2</FONT>")

objRegExp.Pattern="(\[gray\])(.+?)(\[\/gray\])"
strContent=objRegExp.Replace(strContent,"<FONT COLOR=""#77ACAC"">$2</FONT>")

objRegExp.Pattern="(\[green\])(.+?)(\[\/green\])"
strContent=objRegExp.Replace(strContent,"<FONT COLOR=""#009933"">$2</FONT>")

objRegExp.Pattern="(\[blue\])(.+?)(\[\/blue\])"
strContent=objRegExp.Replace(strContent,"<FONT COLOR=""#0055ff"">$2</FONT>")

'任何颜色字
objRegExp.Pattern="(\[color\=)(.+?)(\])(.+?)(\[\/color\])"
strContent=objRegExp.Replace(strContent,"<FONT COLOR=""$2"">$4</FONT>")

objRegExp.Pattern="(\[IMG\])(http:\/\/\S+?)(\[\/IMG\])"
strContent=objRegExp.Replace(strContent,"<a href=""$2"" target=_blank><IMG SRC=""$2"" border=0 onload=""javascript:if(this.width>screen.width-366)this.width=screen.width-366""></a>")
objRegExp.Pattern="(\[IMG\])(\S+?)(\[\/IMG\])"
strContent=objRegExp.Replace(strContent,"<a href=""http://$2"" target=_blank><IMG SRC=""http://$2"" border=0 onload=""javascript:if(this.width>screen.width-366)this.width=screen.width-366""></a>")
objRegExp.Pattern="(\[IMGN\])(http:\/\/\S+?)(\[\/IMGN\])"
strContent=objRegExp.Replace(strContent,"<IMG SRC=""$2"" border=0>")

'带链接的图片
objRegExp.Pattern="(\[IMGurl\=)(http:\/\/\S+?)(\])(http:\/\/\S+?)(\[\/IMGurl\])"
strContent=objRegExp.Replace(strContent,"<a href=""$2"" target=_blank><IMG SRC=""$4"" border=0 onload=""javascript:if(this.width>screen.width-366)this.width=screen.width-366""></a>")
objRegExp.Pattern="(\[IMGurl\=)(\S+?)(\])(\S+?)(\[\/IMGurl\])"
strContent=objRegExp.Replace(strContent,"<a href=""http://$2"" target=_blank><IMG SRC=""http://$4"" border=0 onload=""javascript:if(this.width>screen.width-366)this.width=screen.width-366""></a>")

objRegExp.Pattern="(\[QUOTE\])(.+?)(\[\/QUOTE\])"
strContent=objRegExp.Replace(strContent,"<BLOCKQUOTE><font size=1 face=""Verdana, Arial"">quote:</font><HR>$2<HR></BLOCKQUOTE>")

objRegExp.Pattern="(\[i\])(.+?)(\[\/i\])"
strContent=objRegExp.Replace(strContent,"<i>$2</i>")

objRegExp.Pattern="(\[b\])(.+?)(\[\/b\])"
strContent=objRegExp.Replace(strContent,"<b>$2</b>")

objRegExp.Pattern="(\[big\])(.+?)(\[\/big\])"
strContent=objRegExp.Replace(strContent,"<font size=5>$2</font>")

objRegExp.Pattern="(\[marquee\])(.+?)(\[\/marquee\])"
strContent=objRegExp.Replace(strContent,"<marquee scrollamount='3' id=xxskybbs onmouseover=xxskybbs.stop() onmouseout=xxskybbs.start()>$2</marquee>")
'回滚
objRegExp.Pattern="(\[marqueea\])(.+?)(\[\/marqueea\])"
strContent=objRegExp.Replace(strContent,"<marquee behavior=""alternate"" scrollamount='3' id=xxskybbs onmouseover=xxskybbs.stop() onmouseout=xxskybbs.start()>$2</marquee>")
'特效广告字
objRegExp.Pattern="(\[mqa\])(.+?)(\[\/mqa\])"
strContent=objRegExp.Replace(strContent,"<marquee behavior=""alternate"" scrolldelay=""2"" bgcolor=""#66CCFF"" scrollamount='3' id=xxskybbs onmouseover=xxskybbs.stop() onmouseout=xxskybbs.start()>$2</marquee>")
'FLASH动画特效
objRegExp.Pattern="(\[flash\])(http:\/\/\S+?)(\[\/flash\])"
strContent=objRegExp.Replace(strContent,"<span id=yu><center><PARAM NAME=PLAY value=TRUE><PARAM NAME=LOOP value=TRUE><param name=quality value=high><embed src=""$2"" quality=high width=400 height=300 pluginspage=""http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"" type=""application/x-shockwave-flash""></embed></center></span>")
objRegExp.Pattern="(\[flash\])(\S+?)(\[\/flash\])"
strContent=objRegExp.Replace(strContent,"<span id=yu><center><PARAM NAME=PLAY value=TRUE><PARAM NAME=LOOP value=TRUE><param name=quality value=high><embed src=""http://$2"" quality=high width=400 height=300 pluginspage=""http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"" type=""application/x-shockwave-flash""></embed></center></span>")

set objRegExp=Nothing
UBBCode=strContent
end function
%>
-----------------------------------------------------------------------------------------------

哪里有问题呢??ubbcode可不可以用用人写的代替呢?



micehui

职务:普通成员
等级:1
金币:0.0
发贴:28
注册:2003/11/4 11:08:56
#82003/11/26 13:21:10
而且为什么我在本机测试是正常的呢?传上之后才会出现UBB的错误



janlay

职务:管理员
等级:7
金币:28.0
发贴:7244
注册:2003/11/27 18:07:11
#92003/11/26 14:04:34
升级服务器的 script engine



micehui

职务:普通成员
等级:1
金币:0.0
发贴:28
注册:2003/11/4 11:08:56
#102003/11/26 15:39:48
还要在服务器上做文章啊??目前是偷别人的空间用的,呵呵

最好改UBB,实在不行的话,可不可以不要UBB,把它给删了。

不知道不用UBB有什么坏处?



micehui

职务:普通成员
等级:1
金币:0.0
发贴:28
注册:2003/11/4 11:08:56
#112003/11/26 20:46:16
uBB不是可以防止别人恶意代码的攻击吗?


如果没有UBB保护,那不是完了



micehui

职务:普通成员
等级:1
金币:0.0
发贴:28
注册:2003/11/4 11:08:56
#122003/11/27 12:56:22
<script language="javascript">
alert('懂了?');
</script>


不过这样也不好啊,