Convert the UBB code written in PHP to HTML code
[PHP] code
Url = true; // enable automatic url resolution; default value: false $ eq-> html = true; // enable HTML encoding (processing <,>, FULLWIDTH/halfwidth spaces, tabs, line breaks) default value: true $ eq-> image = true; // enable image tag resolution default value: true $ eq-> font = true; // enable font tag parsing default value: true $ eq-> element = true; // enable external element parsing default value: true $ eq-> flash = true; // enable Flash parsing. default value: true $ eq-> php = true; // enable syntax highlighting. default value: true // echo with ubbEncode parameter ending ($ eq-> getImageOpener ()); // js function echo $ eq-> htmlEncode () required for auto scaling of the output image; // output the ubb encoded string echo ""; echo $ eq-> ubbEncode (); // output the ubb encoded string echo ""; echo $ eq-> removeHtml (); // output the string echo "" that removes the html tag ""; echo $ eq-> ubbEncode (); // the output string that removes the ubb tag supports the ubb tag list: Image class: [img] https://www.php1.cn/ [/Img] insert an image [limg] https://www.php1.cn/ [/Limg] left-side navigation pane [rimg] https://www.php1.cn/ [/Rimg] right-side navigation pane [cimg] https://www.php1.cn/ [/Cimg] Text Control class for center and layout of images: [br] linefeed [B] bold Chinese [B] [I] Italic [I] [u] underline [u] [s] strikethrough [s] [sub] text subscript [sub] [sup] move the text to [sup] [left] left-aligned [left] [right] right-aligned [right] [center] center [center] [align = (left | center | right)] text align [size = ([1-6])] text size [size] [font = (font) [font] [color = (text color)] [color] [list] unordered list [list] [list = s] ordered list [list] [list = (A | 1 | I)] ordered list (the list method is (abc, 123, I II III) [list] [list = (num)] ordered list (counted from num) [list] [li] list unit item [li] external element class: [url] link [/url] [url = (link)] link Text [/url] [email] email address [/email] [email = (email address)] description Text [/email] email address [quote] reference block [/quote] [iframe] interpolation frame address [/iframe] [iframe = (interpolation frame height)] interpolation frame address [/iframe] [swf] flash animation address [/swf] [swf = width, height] flash animation address [/swf] code block: [code] [/code] [php] [/php] [code block name] [/code] [php code block name] [/php] to highlight using php syntax, be sure add"
"Label */class EncodeQ3boy {var $ str =" "; var $ iconpath ="/image/icon "; // Icon file path var $ imagepath = "/upfiles/article "; // default path of the image file // var $ tagfoot = 'border = "1" onload = "ImageLoad (this);" onClick = "ImageOpen (this)" style = "cursor: hand "'; // additional property var $ tagfoot = 'border =" 1 "style =" cursor: hand "'; // the additional property var $ url = false of the image file; // The url is automatically parsed by var $ html = true; // The HTML code var $ image = true; // Parse Image label var $ font = true; // font label var $ element = true; // external element var $ flash = true; // Flash var $ php = true; // syntax highlighting var $ others = true; // Other processing functions during ubb conversion EncodeQ3boy ($ str = '', $ imgph ='') {if ($ str) {$ str = strtr ($ str, array ("\ n \ r" => "\ n", "\ r \ n" => "\ n ", "\ r" => "\ n", "" => ""); $ this-> str = $ str;} if ($ imgph) $ this-> imagepath = $ imgph;} function getImageOpener () {return"