php UBB 解析実装コード
复制代 代码如下:
/**
----------------------------------------------- ----------
* UBB 分析
----------------------------- ----------------------------
* @return string
------------ -----------------------------------------------
*/
function ubb($Text) {
$Text=トリム($Text);
$Text=ereg_replace("n","
",$Text);
$Text=preg_replace("/\t/is"," ",$Text);
$Text=preg_replace("/[hr]/is","
",$Text);
$Text=preg_replace("/[セパレータ]/is","
",$Text);
$Text=preg_replace("/[h1](. ?)[/h1]/is","
\1
",$Text);$Text=preg_replace("/[h2](. ?)[/h2]/is","
\1
",$Text);$Text=preg_replace("/[h3](. ?)[/h3]/is","
\1
",$Text);$Text=preg_replace("/[h4](. ?)[/h4]/is","
\1
",$Text);$Text=preg_replace("/[h5](. ?)[/h5]/is","
\1
",$Text);$Text=preg_replace("/[h6](. ?)[/h6]/is","
\1
",$Text);$Text=preg_replace("/[center](. ?)[/center]/is","
//$Text=preg_replace("/[url=([^[]*)](. ?)[/url]/is"," \2",$Text);
$Text=preg_replace("/[url](. ?)[/url]/is","\1", $Text);
$Text=preg_replace("/[url=(http://. ?)](. ?)[/url]/is","",$Text);
$Text=preg_replace("/[url=(. ?)](. ?)[/url]/is","\2",$Text) ;
$Text=preg_replace("/[img](. ?)[/img]/is","
$Text=preg_replace("/[imgs(. ?)](. ?)[/img]/is","
$Text=preg_replace("/[color=(. ?)](. ?)[/color]/is","\2",$Text) ;
$Text=preg_replace("/[colorTxt](. ?)[/colorTxt]/eis","color_txt('\1')",$Text);
$Text=preg_replace("/[style=(. ?)](. ?)[/style]/is","
$Text=preg_replace("/[size=(. ?)](. ?)[/size]/is","\2",$Text) ;
$Text=preg_replace("/[sup](. ?)[/sup]/is","\1",$Text);
$Text=preg_replace("/[sub](. ?)[/sub]/is","\1",$Text);
$Text=preg_replace("/[pre](. ?)[/pre]/is","
\1",$Text);
$Text=preg_replace("/[emot](. ?)[/emot]/eis","emot('\1')",$Text);
$Text=preg_replace("/[email](. ?)[/email]/is","\1",$Text) ;
$Text=preg_replace("/[i](. ?)[/i]/is","\1",$Text);
$Text=preg_replace("/[u](. ?)[/u]/is","\1",$Text);
$Text=preg_replace("/[b](. ?)[/b]/is","\1",$Text);
$Text=preg_replace("/[quote](. ?)[/quote]/is","
引用:", $Text);\1
$Text=preg_replace("/[code](. ?)[/code]/eis","highlight_code('\1')", $Text);
$Text=preg_replace("/[php](. ?)[/php]/eis","highlight_code('\1')", $Text);
$Text=preg_replace("/[sig](. ?)[/sig]/is","
--------------------------
\1
------ --------------------
$Text を返す;
}

ホットAIツール

Undresser.AI Undress
リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover
写真から衣服を削除するオンライン AI ツール。

Undress AI Tool
脱衣画像を無料で

Clothoff.io
AI衣類リムーバー

AI Hentai Generator
AIヘンタイを無料で生成します。

人気の記事

ホットツール

メモ帳++7.3.1
使いやすく無料のコードエディター

SublimeText3 中国語版
中国語版、とても使いやすい

ゼンドスタジオ 13.0.1
強力な PHP 統合開発環境

ドリームウィーバー CS6
ビジュアル Web 開発ツール

SublimeText3 Mac版
神レベルのコード編集ソフト(SublimeText3)

ホットトピック











PHP 8.4 では、いくつかの新機能、セキュリティの改善、パフォーマンスの改善が行われ、かなりの量の機能の非推奨と削除が行われています。 このガイドでは、Ubuntu、Debian、またはその派生版に PHP 8.4 をインストールする方法、または PHP 8.4 にアップグレードする方法について説明します。

ファイルのアップロードを行うには、フォーム ヘルパーを使用します。ここではファイルアップロードの例を示します。

CakePHP は、PHP 用のオープンソース フレームワークです。これは、アプリケーションの開発、展開、保守をより簡単にすることを目的としています。 CakePHP は、強力かつ理解しやすい MVC のようなアーキテクチャに基づいています。モデル、ビュー、コントローラー

Visual Studio Code (VS Code とも呼ばれる) は、すべての主要なオペレーティング システムで利用できる無料のソース コード エディター (統合開発環境 (IDE)) です。 多くのプログラミング言語の拡張機能の大規模なコレクションを備えた VS Code は、
