国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > PHP > 正文

php實現過濾UBB代碼的類

2020-03-22 19:09:17
字體:
來源:轉載
供稿:網友
本文實例講述了php實現過濾UBB代碼的類。分享給大家供大家參考。具體如下:PHP代碼如下:
復制代碼 代碼如下:html' target='_blank'>class Day{
function ubb($Text) { /// UBB代碼轉換
//$Text=htmlspecialchars($Text);
//$Text=ereg_replace("/r/n"," br ",$Text);
$Text=ereg_replace("/[br/]"," br / ",$Text);
$Text=nl2br($Text);
$Text=stripslashes($Text);
$Text=preg_replace("http:///t/is"," ",$Text);
$Text=preg_replace("http://[url/](http:////.+ )/[//url/]/is"," a href=/"http://1/" target=/"new/" u //1 /u /a ",$Text);
$Text=preg_replace("http://[url/](.+ )/[//url/]/is"," a href=/"http:////1/" target=/"new/" u //1 /u /a ",$Text);
$Text=preg_replace("http://[url=(http:////.+ )/](.+ )/[//url/]/is"," a href=/"http://1/" target=/"new/" u //2 /u /a ",$Text);
$Text=preg_replace("http://[url=(.+ )/](.+ )/[//url/]/is"," a href=/"http:////1/" target=/"new/" u //2 /u /a ",$Text);
$Text=preg_replace("http://[color=(.+ )/](.+ )/[//color/]/is"," font color=/"http://1/" //2 /font ",$Text);
$Text=preg_replace("http://[font=(.+ )/](.+ )/[//font/]/is"," font face=/"http://1/" //2 /font ",$Text);
$Text=preg_replace("http://[email=(.+ )/](.+ )/[//email/]/is"," a href=/"mailto://1/" u //2 /u /a ",$Text);
$Text=preg_replace("http://[email/](.+ )/[//email/]/is"," a href=/"mailto://1/" u //1 /u /a ",$Text);
$Text=preg_replace("http://[i/](.+ )/[//i/]/is"," i //1 /i ",$Text);
$Text=preg_replace("http://[u/](.+ )/[//u/]/is"," u //1 /u ",$Text);
$Text=preg_replace("http://[b/](.+ )/[//b/]/is"," b //1 /b ",$Text);
$Text=preg_replace("http://[fly/](.+ )/[//fly/]/is"," marquee width=/"98%/" behavior=/"alternate/" scrollamount=/"3/" //1 /marquee ",$Text);
$Text=preg_replace("http://[move/](.+ )/[//move/]/is"," marquee width=/"98%/" scrollamount=/"3/" //1 /marquee ",$Text);
$Text=preg_replace("http://[shadow=([#0-9a-z]{1,10})/,([0-9]{1,3})/,([0-9]{1,2})/](.+ )/[//shadow/]/is"," table width=/"*/" tr td "filter:shadow(color=//1, direction=//2 ,strength=//3)/" //4 /td /tr /table ",$Text);
return $Text;
}
}希望本文所述對大家的php程序設計有所幫助。PHP教程

鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯系我們修改或刪除,多謝。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 哈尔滨市| 恩施市| 社会| 望都县| 定西市| 荆州市| 麻城市| 娱乐| 亚东县| 清镇市| 南丰县| 博客| 堆龙德庆县| 赤水市| 扎囊县| 卓尼县| 连云港市| 濮阳县| 德惠市| 南安市| 天柱县| 张掖市| 都江堰市| 明溪县| 辉南县| 江川县| 荔波县| 湘乡市| 精河县| 卓尼县| 栖霞市| 镇原县| 商洛市| 张家口市| 大城县| 台江县| 酉阳| 万山特区| 齐齐哈尔市| 黄冈市| 广东省|