導讀 跟大家講解下有關stuck_out_tongue_winking_eye 一個ubbcode的函數,速度很快,相信小伙伴們對這個話題應該也很關注吧,現在就為小伙伴們
跟大家講解下有關stuck_out_tongue_winking_eye 一個ubbcode的函數,速度很快,相信小伙伴們對這個話題應該也很關注吧,現在就為小伙伴們說說stuck_out_tongue_winking_eye 一個ubbcode的函數,速度很快,小編也收集到了有關stuck_out_tongue_winking_eye 一個ubbcode的函數,速度很快的相關資料,希望大家看到了會喜歡。
前面見到有人發表 但是速度比較慢,也非常長 這里給出一種 function ubb($str) { $color=Array('red','blue','green'); $str=eregi_replace('\[url\]([a-zA-Z0-9@:%_.~#-\?&]+)\[\/url\]','\\1',$str);//url $str=eregi_replace('\[url=http://([a-zA-Z0-9@:%_.~#-\?&]+)\](.+)\[\/url\]','\\2',$str); $str=eregi_replace('\[url=([a-zA-Z0-9@:%_.~#-\?&]+)\](.+)\[\/url\]','\\2',$str); $str=eregi_replace('\[img\]([a-zA-Z0-9@:%_.~#-\?&]+)\[\/img\]','\\1
", $str); $str=preg_replace("/\[sig\](.+?)\[\/sig\]/is","--------------------------\\1--------------------------", $str); return $str; }
以上就介紹了stuck_out_tongue_winking_eye 一個ubbcode的函數,速度很快,包括了stuck_out_tongue_winking_eye方面的內容,希望對PHP教程有興趣的朋友有所幫助。
來源:php中文網