PHP - Html Transfer Code


Posted in PHP onOctober 09, 2006

PHP - Html Transfer Code 超文本转换码,市面上这东西已经很滥(多)了,不过是这几天自己实践了一下~~~~

支持 多重嵌套 和 同标签嵌套,混合高亮显示(还有一点小问题)

自我感觉便于修改和扩充~~~~~~~~~~~

<?php
/**************************************************
*                                                 *
* Name    : Functions 4 Html Transfer Code (HTC)  *
* Version : 1.3.2                                 *
* Author  : Windy_sk                              *
* Create  : 2003-09-03                            *
* Modified: 2003-12-17                            *
* Email   : windy_sk@126.com                      *
* HomePage: None (Maybe Soon)                     *
* Notice  : U Can Use & Modify it freely,         *
*           BUT PLEASE HOLD THIS ITEM.            *
*                                                 *
**************************************************/

$htc_list = array(
                "B"                => "<b>\\1</b>",
                "I"                => "<i>\\1</i>",
                "U"                => "<u>\\1</u>",
                "CENTER"        => "<center>\\1</center>\n",
                "URL"                => "<a href='\\1'>\\1</a>",
                "EMAIL"                => "<a href='mailto:\\1'>\\1</a>",
                "IMAGE"                => "<br /><table align=center width='100%'><tr><td align='center'><img src='\\1' border='0' onload='org_w=this.offsetWidth;this.style.width=10;this.style.width=(org_w>parseInt(this.offsetParent.offsetWidth))?this.offsetParent.offsetWidth:org_w' onclick='window.open(this.src)' style='cursor:pointer' /></td></tr></table><br />\n",
                "DOWNLOAD"        => "exec:get_dl_html('\\1')",
                "LIST"                => "exec:get_list_html('\\1')",
                "QUOTE"                => "<center><table border='0' width='90%' cellspacing='0' cellpadding='0'><tr><td>  引用:</td></tr><tr><td><table width='100%' class='quote'><tr><td>\\1</td></tr></table></td></tr></table></center>\n",
                "IFRAME"        => "<table align=center><tr><td><iframe src='\\1' frameborder='0' allowtransparency='true' scrolling='yes' width='400' height='300'></iframe></td></tr></table>\n",
                "MOVE"                => "<center><marquee width='90%' behavior='alternate' scrollamount='3'>\\1</marquee><center>\n",
                "GLOW"                => "<table><tr><td class='glow'>\\1</td></tr></table>\n",
                "SHADOW"        => "<table><tr><td class='shadow'>\\1</td></tr></table>\n",
                "DROPSHADOW"        => "<table><tr><td class='dropshadow'>\\1</td></tr></table>\n",
                "GBMUSIC"        => "<bgsound src='\\1' loop='-1'>\n",
                "MUSIC"                => "<TABLE cellSpacing=0 cellPadding=0 align=center border=0><TBODY><TR><TD vAlign=top colSpan=3><EMBED name=music_rm align=top src='\\1' width='200' height='30' type='audio/x-pn-realaudio-plugin' console='ClipNN' loop='false' autostart='false' controls='ControlPanel' border='1' vspace='0' hspace='0'></EMBED><br><STRONG><A href='\\1'>Download The Music</A></STRONG></TD></TR></TBODY></TABLE>\n",               
                "FLASH"                => "<table align=center><tr><td><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='400'><param name='movie' value='\\1'><param name='quality' value='high'><embed src='\\1' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='32' height='32'></embed></object></td></tr></table>\n",
                "SHOCKWAVE"        => "<table align=center><tr><td><object classid='clsid:166B1BCA-3F9C-11CF-8075-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,0,0' width='400'><param name='src' value='\\1'><embed src='\\1' pluginspage='http://www.macromedia.com/shockwave/download/' width='400'></embed></object></td></tr></table>\n",
                "QUICKTIME"        => "<table align=center><tr><td><embed src='\\1' width='400' height='300' autoplay='true' loop='false' controller='true' playeveryframe='false' cache='false' scale='TOFIT' bgcolor='#000000' kioskmode='false' targetcache='false' pluginspage='http://www.apple.com/quicktime/'><br><STRONG><A href='\\1'>Download The Movie</A></STRONG></td></tr></table>\n",
                "REALPLAYER"        => "<TABLE cellSpacing=0 cellPadding=0 align=center border=0><TBODY><TR><TD vAlign=top colSpan=3><EMBED name=movie_rm align=top src='\\1' width='400' height='300' type='audio/x-pn-realaudio-plugin' console='ClipNN' loop='true' autostart='true' controls='ImageWindow,ControlPanel' border='1' vspace='0' hspace='0'></EMBED><br><STRONG><A href='\\1'>Download The Movie</A></STRONG></TD></TR></TBODY></TABLE>\n",
                "MEDIAPLAYER"        => "<table align=center><tr><td><object classid='clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95' width='400'><param name='ShowStatusBar' value='-1'><param name='Filename' value='\\1'><embed type='application/x-oleobject' codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701' flename='mp' src='\\1' width='400'></embed></object><br /><STRONG><A href='\\1'>Download The Movie</A></STRONG></td></tr></table>\n",
                "VOTE"                => "exec:get_vote_html('\\1')",
                );

$htc_list_att = array(
                "ALIGN"                => "<div align='\\1'>\\2</div>\n",
                "URL"                => "<a href='\\1'>\\2</a>",
                "EMAIL"                => "<a href='mailto:\\1'>\\2</a>",
                "IMAGE"                => "<br /><table align=center width='100%'><tr><td><img alt='\\1' src='\\2' border='0' onload='org_w=this.offsetWidth;this.style.width=10;this.style.width=(org_w>parseInt(this.offsetParent.offsetWidth))?this.offsetParent.offsetWidth:org_w;' onclick='window.open(this.src)' style='cursor:pointer' /></td></tr></table><br />\n",
                "FONTFACE"        => "<span style='FONT-FAMILY:\\1'>\\2</span>",
                "FONTSIZE"        => "<span style='font-size:\\1'>\\2</span>",
                "FONTCOLOR"        => "<span style='color:\\1'>\\2</span>",
                "DOWNLOAD"        => "exec:get_dl_html('\\1', '\\2')",
                "LIST"                => "exec:get_list_html('\\2','\\1')",
                "ATTACH"        => "exec:get_attach_html('\\2', '\\1')",
                "VOTE"                => "exec:get_vote_html('\\1','\\2')",
                );

$htc_list_spl = array(
                "PHP"                => "exec:get_highlight_html('\\1', 'php')",
                "CSS"                => "exec:get_highlight_html('\\1', 'css')",
                "HTML"                => "exec:get_highlight_html('\\1', 'html')",
                "SCRIPT"        => "exec:get_highlight_html('\\1', 'script')",
                "CODE"                => "exec:get_code_html('\\1')",
                "EXECUTE"        => "\\1",
                );

function get_highlight_html($str, $type = "php") {
        $type = strtolower($type);
        $type_func = $type."_highlight";
        $type = strtoupper($type);
        $result = "<center><table border='0' width='90%' cellspacing='0' cellpadding='0'>";
        if(!function_exists($type_func)) $type_func = "php_highlight";
        $result .= "
        <tr><td>高亮显示 <font color='red'>{$type}</font> 代码:</td></tr>
        <tr><td>
          <table width='100%' class='quote'><tr><td>
          ".$type_func($str)."
          </td></tr></table>
        ".($type=="HTML"?"<input type='button' value='运行代码' onclick=\"str=this.parentNode.firstChild.innerText;if(str==undefined){alert('Execute Codez Failed !');return;}code_win=window.open('about:blank');doc=code_win.document;doc.open();doc.write(str);doc.close();code_win.focus();\" />":"")."
        <input type='button' value='复制代码' onclick=\"try{window.clipboardData.setData('text',this.parentNode.firstChild.innerText);alert('Save Codez To The Clipboard !');}catch(e){alert('Codez Copy Failed !');}\">
        <input type='button' value='保存代码' onClick=\"try{str=this.parentNode.firstChild.innerText;code_win=window.open('about:blank','_blank','top=10000');code_win.document.writeln(str);code_win.document.execCommand('saveas','','code.html');code_win.close();}catch(e){alert('Codez Save Failed !');}\">
        </td></tr>
        </table></center>
        ";
        return $result;
}

function php_highlight($str) {
        $str = str_replace("\\\"","\"",$str);
        return highlight_string($str, true);
}

function css_highlight($str, $nl = true) {
        $color_1 = "red";
        $color_2 = "green";
        $color_3 = "blue";
        $str = str_replace("\\\"","\"",$str);
        $str = str_replace("\r", "", $str);
        preg_match_all("/[\\\*\.\w#: ]+\{[^\{\}]+\}/", $str, $arr_css);
        $arr_css = $arr_css[0];
        for($i=0; $i<count($arr_css); $i++) {
                $head = preg_replace("/([\\\*\.\w#: ]+\{)[^\{\}]+\}/", "<font color='{$color_1}'>\\1</font>".($nl?"<br />\n":""), $arr_css[$i]);
                $unit = preg_replace("/[\\\*\.\w#: ]+\{([^\{\}]+)\}/", "\\1", $arr_css[$i]);
                $unit_list = preg_split("/;\s*/", $unit);
                $unit = "\n";
                for($j=0; $j<count($unit_list); $j++) {
                        if(strlen($unit_list[$j])>0)
                                $unit .= "    " . preg_replace("/\s*([\w\-]+)\s*:\s*(.*)/e", "'<font color=\'{$color_2}\'>\\1</font> : <font color=\'{$color_3}\'>'.htmlspecialchars('\\2').'</font> ; '", $unit_list[$j]) . ($nl?"<br />\n":"\n");
                }
                $arr_css[$i] = $head . $unit . "<font color='{$color_1}'>}</font>";
        }
        return join(($nl?"\n<br /><br />\n":"\n\n"), $arr_css);
}

function script_highlight_note($str, $mode = true) {
        $color_note = "gray";
        $str = str_replace("\\\"","\"",$str);
        $str = preg_replace("/<font color='[a-z]+'>(.*)<\/font>/isU", "\\1", $str);
        $str = $mode?"/*{$str}*/":"//{$str}";
        return "<font color='{$color_note}'>{$str}</font>";
}

function script_highlight($str, $nl = true) {
        $color_1 = "red";
        $color_2 = "blue";
        $color_3 = "brown";
        $color_4 = "green";
        $str = str_replace("\\\"","\"",$str);
        $str = htmlspecialchars($str);
        $str = str_replace("=","&equal;",$str);
        $str = str_replace("|","&vertical;",$str);
        $keywords = array(
                        "{$color_1}"        => array("null", "true", "false", "NaN"),
                        "{$color_2}"        => array("var", "for", "if", "else", "switch", "case", "function", "loop", "continue", "break", "<", ">", "!&equal;", "&equal;&equal;", "&equal;", "&&", "&vertical;&vertical;"),
                        "{$color_3}"        => array("window", "self", "this", "event", "document", "opener", "Navigator", "Math", "Array", "String", "Object", "Function", "Number"),
                        );
        foreach($keywords as $key => $value) {
                for($i=0; $i<count($value); $i++) {
                        $str = preg_replace("/(\W)(".$value[$i].")(\W)/", "\\1<font color='{$key}'>\\2</font>\\3", $str);
                }
        }
        $str = preg_replace("/(\.|\s)([a-z]+)\(/i" ,"\\1<font color='{$color_4}'>\\2</font>(", $str);
        $str = preg_replace("/\.(\w+)(?!\()/i" ,".<font color='{$color_3}'>\\1</font>", $str);
        $str = preg_replace("/\/\/([^\n]*)\n/e" ,"script_highlight_note('\\1', false)", $str);
        $str = preg_replace("/\/\*(.*?)\*\//es" ,"script_highlight_note('\\1')", $str);       
        $str = str_replace("\t", "    ", $str);
        $str = str_replace("&equal;","=",$str);
        $str = str_replace("&vertical;","|",$str);
        return $nl?nl2br($str):$str;
}

function html_highlight_attr($att) {
        $color_1 = "red";
        $color_2 = "brown";
        $color_3 = "black";
        $att = str_replace("\\\"","\"",$att);
        $att = preg_replace("/=\s*('|\")([^'\"]+)\\1/eU","'=\\1'.preg_replace('/\s+/','|:s:|','\\2').'\\1'",$att);
        $att = str_replace("\\\"","\"",$att);
        $att .= " ";
        preg_match_all("/[a-z:\/\-]+(=(['\"]?).*[^\\\\]{1}\\2?)?\s+/iU", $att, $att_list);
        $att_list = $att_list[0];
        for($i=0; $i<count($att_list); $i++) {
                if(empty($att_list[$i])) continue;
                $att_list[$i] = trim($att_list[$i]);
                $att_list[$i] = preg_replace("/([^=]+)([=]?)(['\"]?)(.*)(\\3)/", "<font color='{$color_2}'>\\1</ font><font color='{$color_1}'>\\2</ font>\\3<font color='{$color_3}'>\\4</ font>\\3", $att_list[$i]);
        }
        return str_replace("|:s:|", " ", join(" ", $att_list));
}

function html_highlight($str) {
        $color_1 = "red";
        $color_2 = "blue";
        $color_3 = "gray";
        $str = str_replace("\\\"","\"",$str);
        preg_match_all("/<script([^>]*)>(.*)<\/script>/isU", $str, $arr_tmp);
        $arr_script = $arr_tmp[0];
        for($i=0; $i<count($arr_script); $i++) {
                $str = str_replace($arr_script[$i], "
::script_{$i}::
", $str);
                $arr_script[$i] = preg_replace("/<script([^>]*)>(.*)<\/script>/iseU", "'<font color=\'{$color_2}\'><SCRIPT '.html_highlight_attr('\\1').'></font><br />'.script_highlight(str_replace('\\\"','\"','\\2'), false).'<font color=\'{$color_2}\'></SCRIPT></font>'", $arr_script[$i]);
        }
        $str = preg_replace("/(<textarea[^>]*>)(.*)(<\/textarea>)/ieU" ,"'\\1'.htmlspecialchars('\\2').'\\3'", $str);
        $str = preg_replace("/<!\-\-(.*)\-\->/seU" ,"'<!--'.htmlspecialchars('\\1').'-->'", $str);
        $str = preg_replace("/<style([^>]*)>(.*)<\/style>/isU" ,"<!style\\1>\\2</style!>", $str);
        $str = preg_replace("/<([a-z:]+)\s*(.*?)( \/|\/)?>/ise" ,"'<font color=\'{$color_2}\'><\\1 '.html_highlight_attr('\\2').'\\3></ font>'", $str);
        $str = preg_replace("/<(\/[a-z:]+)>/i" ,"<font color='{$color_2}'><\\1></font>", $str);
        $str = preg_replace("/<(!\-\-.*\-\-)>/sU" ,"<font color='{$color_3}'><\\1></font>", $str);
        $str = preg_replace("/<!style([^>]*)>(.*)<\/style!>/iseU" ,"'<font color=\'{$color_2}\'><STYLE '.html_highlight_attr('\\1').'></font><br />'.css_highlight(str_replace('\\\"','\"','\\2'), false).'<br /><font color=\'{$color_2}\'></STYLE></font>'", $str);
        for($i=0; $i<count($arr_script); $i++) {
                $str = str_replace("
::script_{$i}::
", $arr_script[$i], $str);
        }
        $str = str_replace("</ font>", "</font>", $str);
        $str = str_replace("</ b>", "</b>", $str);
        $str = str_replace(" >", ">", $str);
        $str = str_replace("  ","  ",$str);
        $str = str_replace("\t","    ",$str);
        return nl2br($str);
}

function get_file_pic($filename) {
        global $root_path;
        $ext = str_replace(".","",strrchr($filename,"."));
        $pic = $root_path."images/mime_type/{$ext}.gif";
        return file_exists($pic)?"$pic":$root_path."images/mime_type/attch.gif";
}

function get_dl_html($filename, $str = "") {
        return "<img src='".get_file_pic($filename)."' border='0'> <a href='$filename'>".(empty($str)?basename($filename):$str)."</a>";
}

function get_attach_html($filename, $id) {
        return "<img src='".get_file_pic($filename)."' border='0'> <a href='attach_manage.php?method=download&id=$id'>$filename</a>";
}

function get_vote_html($vote_idx, $message = ""){
        global $db_host, $db_user, $db_pass, $db_name;
        $db = new DB_Manager($db_host, $db_user, $db_pass);
        $db->Connect();
        $db->SelectDB($db_name);
        $db->Query("select * from mnms_poll where id=".$vote_idx);
        $record = $db->GetRS();
        $str = "";
        $db->close();
        unset($db);
        if($record) {
                $username = "dummy";
                $if_vote = !(strpos($record[vote_user], "|{$username}|")===false)
strpos($record[vote_user], "|".GetIp()."|");
                $str .= "
                        <fieldset>
                          <legend align='left' color=black>".(empty($message)?$record[vote_title]:$message)."</legend>
                          <form name='poll' action='poll_manage.php?method=vote' method='post'>
                          <table width='90%' align='center'>";
                $vote_list = split("::",$record[vote_list]);
                $vote_count = split("::",$record[vote_count]);
                $vote_users = count(split("\n", $record[vote_user])) - 1;
                $vote_sum = array_sum($vote_count);
                $str .= "
                            <tr><td colspan='2'> 目前共有 <font color='red'>{$vote_users}</font> 人参与了本投票 </td></tr>";
                if($vote_sum==0) $vote_sum = 1;
                for($i=0; $i<count($vote_list); $i++) {
                        $str .= "
                            <tr><td>".($if_vote?"► ":"<input type='hidden' value='".$vote_count[$i]."' name='vote_count[]'><input type='".($record[vote_multi]=='Y'?"checkbox":"radio")."' name='vote[]' value='{$i}'>").htmlspecialchars($vote_list[$i])."</td><td width='400'><img src='images/bars/bar".($i+1).".gif' width='".ceil($vote_count[$i]*300/$vote_sum)."' height='10'> 占总票数的 <font color='#990000'>".ceil((int)$vote_count[$i]*100/$vote_sum)."%</font></td></tr>\n";
                }
                $str .= "<tr><td colspan='2' align='center'><br>".($if_vote?"<b>您已经投过票了!</b>":"<input type='hidden' value='{$record[id]}' name='id'><input type='Submit' value=' 确 定 ' name='Submit'>   <input type='reset' value=' 重 置 ' name='reset'>")."</td></tr>";
                $str .= "
                          </table>
                          </form>
                        </fieldset>";
        }
        return $str;
}

function get_code_html($str) {
        $str = str_replace("\\\"","\"",$str);
        return "
        <table align='center' width='550'>
          <tr><td><textarea cols='80' rows='10' name=Code>".htmlspecialchars($str)."</textarea><br>
            <input type='button' value='运行代码' onClick=\"str=this.parentNode.firstChild.value;code_win=window.open('about:blank');doc=code_win.document;doc.open();doc.write(str);doc.close();code_win.focus();\">
            <input type='button' value='复制代码' onclick=\"try{window.clipboardData.setData('text',this.parentNode.firstChild.value);alert('Save Codez To The Clipboard !');}catch(e){alert('Please Copy The Selected Codez !');this.parentNode.firstChild.select();}\">
            <input type='button' value='保存代码' onClick=\"str=this.parentNode.firstChild.value;code_win=window.open('about:blank','_blank','top=10000');code_win.document.writeln(str);code_win.document.execCommand('saveas','','code.html');code_win.close();\">
            (提示:可以先修改部分代码)
          </td></tr>
        </table>";
}

function get_list_html($content, $type = "") {
        $content = preg_replace("/(<br \/>)?[\r\n]+/", "\n", $content);
        $content = preg_replace("/[\r\n]+/", "\n", $content);
        $content = preg_replace("/^[\n]*(.*)[\n]*$/m", "\\1", $content);
        $content = str_replace("\n", "</li><li>", $content);
        $content = "<ul type='$type'><li>$content</li></ul>\n";
        return $content;
}

function html_trans($str) {
        $search  = array("&",                "'",                "\"",                "<",        ">",        "  ",                "\t");
        $replace = array("&",        "'",        """,        "<",        ">",        "  ",        "    ");
        return nl2br(str_replace($search, $replace, $str));
}

function link_url($str) {
        $str = preg_replace("/((http|ftp|mms|rtsp|pnm|mailto):\/\/[\w@:\.\/\?=&;#\-%]+)/i", "<a href='\\1' target='_blank'>\\1</a>", $str);
        $str = preg_replace("/(\w+@(\w+\.)+[\w]{2,3})/i", "<a href='mailto:\\1'>\\1</a>", $str);
        $str = preg_replace("/(href|src)='<a href=('.+')>[^<]+<\/a>'/iU", "\\1=\\2", $str);
        return $str;
}

function htc2html_loop($str) {
        global $htc_list, $htc_list_att;
        foreach($htc_list as $key => $value) {
                if(substr($value,0,5)=="exec:"){
                        $str = preg_replace("/\[$key\]((.(?!\[$key(\s?=\s?([^\]]+))?\]))*)\[\/$key\]/iexsU", substr($value,5), $str);
                } else {
                        $str = preg_replace("/\[$key\]((.(?!\[$key(\s?=\s?([^\]]+))?\]))*?)\[\/$key\]/ixsU", "$value", $str);
                }
        }
        foreach($htc_list_att as $key => $value) {
                if(substr($value,0,5)=="exec:"){
                        $str = preg_replace("/\[$key\s?=\s?([^\]]+)\]((.(?!\[$key(\s?=\s?([^\]]+))?\]))*)\[\/$key\]/iesxU", substr($value,5), $str);
                } else {
                        $str = preg_replace("/\[$key\s?=\s?([^\]]+)\]((.(?!\[$key(\s?=\s?([^\]]+))?\]))*)\[\/$key\]/isxU", "$value", $str);
                }
        }
        return $str;
}

function htc2html($str, $trans_url = true , $loop = 3) {
        global $htc_list_spl;
        $str = preg_replace("/(\[\w+\])\s*/ixs","\\1",$str);
        $str = preg_replace("/\s*(\[\/\w+\])/ixs","\\1",$str);
        foreach($htc_list_spl as $key => $value) {
                preg_match_all("/\[$key\](.*)\[\/$key\]/ixsU", $str, $arr_tmp);
                $arr_spl[$key] = $arr_tmp[0];
                for($i=0; $i<count($arr_spl[$key]); $i++) {
                        $str = str_replace($arr_spl[$key][$i], "
::{$key}_{$i}::
", $str);
                        if(substr($value,0,5)=="exec:"){
                                $arr_spl[$key][$i] = preg_replace("/\[$key\](.*)\[\/$key\]/iexsU", substr($value,5), $arr_spl[$key][$i]);
                        } else {
                                $arr_spl[$key][$i] = preg_replace("/\[$key\](.*)\[\/$key\]/ixsU", "$value", $arr_spl[$key][$i]);
                        }
                }
        }
        $str = html_trans($str);
        while($loop-- > 0) {
                if(!preg_match("/\[(\w+)(\s?=\s?([^\]]+))?\](.*)\[\/\\1\]/isU", $str)) break;
                $str = htc2html_loop($str);
        }
        if($trans_url) $str = link_url($str);
        foreach($htc_list_spl as $key => $value) {
                for($i=0; $i<count($arr_spl[$key]); $i++) {
                        $str = str_replace("
::{$key}_{$i}::
", $arr_spl[$key][$i], $str);
                }
        }
        return $str;
}
?>

使用方法:

echo htc2html($str);

OK 了~~~~~~~~

PHP 相关文章推荐
用php或asp创建网页桌面快捷方式的代码
Mar 23 PHP
PHP学习笔记 (1) 环境配置与代码调试
Jun 19 PHP
php上传文件,创建递归目录的实例代码
Oct 18 PHP
php中的ini配置原理详解
Oct 14 PHP
PHP执行SQL文件并将SQL文件导入到数据库
Sep 17 PHP
php检查页面是否被百度收录
Oct 28 PHP
深入解析PHP中foreach语句控制数组循环的用法
Nov 30 PHP
PHP常用文件操作函数和简单实例分析
Jun 03 PHP
对PHP依赖注入的理解实例分析
Oct 09 PHP
PHP用户注册邮件激活账户的实现代码
May 31 PHP
php实现微信原生支付(扫码支付)功能
May 30 PHP
ThinkPHP3.1.2 使用cli命令行模式运行的方法
Apr 14 PHP
关于PHP中操作MySQL数据库的一些要注意的问题
Oct 09 #PHP
模拟xcopy的函数
Oct 09 #PHP
生成缩略图
Oct 09 #PHP
一个目录遍历函数
Oct 09 #PHP
phpBB BBcode处理的漏洞
Oct 09 #PHP
用IE远程创建Mysql数据库的简易程序
Oct 09 #PHP
PHP使用者状态管理功能的应用
Oct 09 #PHP
You might like
php仿ZOL分页类代码
2008/10/02 PHP
PHP中如何防止外部恶意提交调用ajax接口
2016/04/11 PHP
PHP实现JS中escape与unescape的方法
2016/07/11 PHP
php简单实现多维数组排序的方法
2016/09/30 PHP
详解PHP中mb_strpos的使用
2018/02/04 PHP
Dom加载让图片加载完再执行的脚本代码
2008/05/15 Javascript
jquery 插件 任意位置浮动固定层
2008/12/25 Javascript
JQuery触发radio或checkbox的change事件
2012/12/18 Javascript
JS中如何判断传过来的JSON数据中是否存在某字段
2014/08/18 Javascript
jQuery焦点图切换简易插件制作过程全纪录
2014/08/27 Javascript
纯js实现无限空间大小的本地存储
2015/06/18 Javascript
浅谈jquery中delegate()与live()
2015/06/22 Javascript
jQuery实现ctrl+enter(回车)提交表单
2015/10/19 Javascript
浅析jQuery Ajax通用js封装
2016/06/22 Javascript
用js动态添加html元素,以及属性的简单实例
2016/07/19 Javascript
最棒的Angular2表格控件
2016/08/10 Javascript
JS实现动画兼容性的transition和transform实例分析
2016/12/13 Javascript
Ionic+AngularJS实现登录和注册带验证功能
2017/02/09 Javascript
js删除数组中某几项的方法总结
2019/01/16 Javascript
JavaScript设计模式之装饰者模式实例详解
2019/01/17 Javascript
微信小程序学习笔记之表单提交与PHP后台数据交互处理图文详解
2019/03/28 Javascript
JS前端知识点offset,scroll,client,冒泡,事件对象的应用整理总结
2019/06/27 Javascript
javascript面向对象三大特征之继承实例详解
2019/07/24 Javascript
[00:43]DOTA2小紫本全民票选福利PA至宝全方位展示
2014/11/25 DOTA
wxpython 最小化到托盘与欢迎图片的实现方法
2014/06/09 Python
python编写爬虫小程序
2015/05/14 Python
Python实现的科学计算器功能示例
2017/08/04 Python
Python SSL证书验证问题解决方案
2020/01/13 Python
tensorflow实现从.ckpt文件中读取任意变量
2020/05/26 Python
Timberland俄罗斯官方网上商店:全球领先的户外品牌
2020/03/15 全球购物
大专毕业生自我鉴定
2013/11/21 职场文书
2015年数学教师工作总结
2015/05/20 职场文书
放假通知怎么写
2015/08/18 职场文书
2019年“我为祖国点赞”演讲稿(3篇)
2019/09/26 职场文书
导游词之五台山
2019/10/11 职场文书
Pytorch中的数据集划分&正则化方法
2021/05/27 Python