国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

首頁 後端開發(fā) php教程 PHP - Html Transfer Code_PHP教程

PHP - Html Transfer Code_PHP教程

Jul 21, 2016 pm 04:09 PM
code html php 轉(zhuǎn)換


PHP - Html Transfer Code 超文本轉(zhuǎn)換碼,市面上這東西已經(jīng)很濫(多)了,不過是這幾天自己實(shí)踐了一下~~~~

支持多重嵌套和同標(biāo)籤嵌套,混合高亮顯示(還有一點(diǎn)小問題)

自我感覺方便修改和擴(kuò)充~~~~~~~~~~~

/****************************************************
*? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?????>* 版本: 1.3.2? ?? ?? ?? ?? ?? ?? ?? ?? ?? ????? ?? ?*
* 建立??: 2003-09-03? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? *
* 修改時(shí)間: 2003-12-17? ?? ?? ?? ?? ?? ?? ?? ?? ? ** 首頁:無(可能很快)? ?? ?? ?? ?? ?? ???*
* 注意:您可自由使用和修改它,? ?? ?? ?*
*? ?? ?? ???但請(qǐng)保留此物品。 *
*? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??******?*** *******/

$htc_list = array(
? ? ? ? ? ? ? ? "B"? ? ? ? ? ? ?? => " ? ? ? ? ? ??? ? ? ? ? ? ? ? => "\1" ,
? ? ? ? ? ? ? ? "U"? ? ? ? ? ? ? ? => "\1",n",
? ? ? ? ? ? ? ? "URL"? ? ? ? ? ? ? ? => "\1",
? ? ? ? ? ? ? ? "EMAIL"? ? ? ? ? ? ? ?? " IMAGE"? ? ? ? ? ? ? ? => "

PHP - Html Transfer Code_PHP教程parseInt(this.offsetParent.offsetWidth))?this.offsetParent.offsetWidth:org_w' onclick='window.open(this.src) ' style="max-width:90%" />

n",
? ? ? ? ? ? ? ? "DOWNLOAD"? ? ?? => "exec:get_dl_html(.\ ??>? ? ? ? ? ? ? ? "LIST"? ? ? ? ? ? ? ? => "exec:get_list_html('\1')", "

? 引用:
\1
n",
“IFRAME”=> "n",
? ? ? ? ? ? ? ? "移動(dòng)"? ? ? ? ? ? ? ? => "\1選框>n",
? ? ? ? ? ? ? ? "GLOW"? ? ? ? ? ? ? ? =>; "
n",
? ? ? ? ? ? ? ? 「陰影」? ? ? ? => "
\1
n",\1n",\1n",\1n",; "
\1
n",
? ? ? ? ?? ?src='\1' Loop='-1'>n",
? ? ? ? ? ? ? ? "音樂"? ? ? ? ? ? ? ? => "
下載音樂 ;
n",? ? ? ? ? ? ? ?
? ? ? ? ? ? tr>n",
? ? ? ? ? ? ? ? "衝擊波"? ? ? ? =>; “ ; “ > ;n",
? ? ? ? ? ? ? ? “QUICKTIME”? ? ? ? => "下載電影 n",
? ? ? ? ? ? ? ? "REALPLAYER"? ? ? ? => "

Download The Movie
\n",
? ? ? ? ? ? ? ? "MEDIAPLAYER"? ? ? ? => "

Download The Movie
\n",
? ? ? ? ? ? ? ? "VOTE"? ? ? ? ? ? ? ? => "exec:get_vote_html('\\1')",
? ? ? ? ? ? ? ? );

$htc_list_att = array(
? ? ? ? ? ? ? ? "ALIGN"? ? ? ? ? ? ? ? => "
\\2
n",
? ? ? ? ? ? ? ? "URL"? ? ? ? ? ? ? ? => "\?? ? ? ? => "\2",
? ? ? ? ? ? ? ? "影像"? ? ? ? ? ? ? ? => "
PHP - Html Transfer Code_PHP教程 td> "
PHP - Html Transfer Code_PHP教程 td> '\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="max-width:90%" />
>n",
? ? ? ? ? ? ? ? " FONTFACE "? ? ? ? => "\2",
? ? ? ? ? ? ? ? "FONTSIZE" ? ? ? ? ? ? "FONTSIZE" ? ? ? style ?/span>",
? ? ? ? ? ? ? ? "字型顏色"? ? ? ? => "\2?:get_dl_html('\1 ', '\2')",
? ? ? ? ? ? ? ? "名單"? ? ? ? ? ? ? ? => "exec:get_list_html('\2',''\1') ??? ? ? => "exec:get_attach_html('\2 ', '\1')",
? ? ? ? ? ? ? ? "投票"? ? ? ? ? ? ? ? => "exec:get_vote_html('\1','\2')",
);

$htc_list_spl = array(
? ? ? ? ? ? ? ? "PHP"? ? ? ? ? ? ? ? => "exec:get_highlight_html('\1', 'php')",?? ? ? ? =>「執(zhí)行: get_highlight_html('\1', 'css')",
? ? ? ? ? ? ? ? "HTML"? ? ? ? ? ? ? ? => "exec:get_highlight_html('\1', 'html ?c:get_highlight_html('\1', 'script')",
"代碼"? ? ? ? ? ? ? ? =>; "exec:get_code_html('\1')",
? ? ? ? ? ? ? ? "執(zhí)行"? ? ? ? ? ? ? ? "執(zhí)行"? ? ? ? ? ? ? ?? );


function get_highlight_html($str , $type = "php") {
? ? ? ? $type = strtolower($type);
? ? ? ? $type_func = $type."_highlight";
?result = "
";
? ? ? ? if(!function_exists($type_func)) $type_func = "php_hightype_func. ;
? ? ? ? $result .= "
? ? ? ?
高亮顯示{$type} 代碼:

? ? ? ?? ?

? ? ? ?? ?".$type_func($str)."

? ? ? ? ".($type=="HTML"?"":"")."
? ? ? ?
? ? ? ? ? ? )


function css_highlight($str, $nl = true) {
? ? ? ? $color_1 = "紅色";
? ? ? $color_2 = "綠色";
? ?? ? $color_2 = "綠色";
? ?? 30 $color_2 = "綠色";
? ?" ;
? ? ? ? $str = str_replace("\"","",$str);
? ? ? ? $str = str_replace("r", "", $str. \ *.w#: ] {[^{}] }/", $str, $arr_css);
? ? ? ? $arr_css = $arr_css[0];
? ? ? ? for($i =0; $i? ? ? ? ? ? ? ? $head = preg_replace("/([\*.w#: ] {)[^{}] }/", " \1".($nl?"
n":""), $arr_css[$i]);
? ? ? ? ? ? ? ? $unit = preg_replace("/[\*.ww#. ] {([^{}] )}/", "\1", $arr_css[$i]);
? ? ? ? ? ? ? ? $unit_list = preg_split("/?unit = "n";
? ? ? ? ? ? ? ? for($j=0; $j? ? ? ? ? ? ? ? ? ? ? ? if(strlen($unit_list[$j])>0)
??= "? ? " . preg_replace("/s*([w-] )s*:s*(.*)/e", "'\1 : '.htmlspecialchars('\2').' '", $unit_list[$j]) 。 ($nl?"
n":"n");
? ? ? ? ? ? ? ? }
? ? ? ? ? ? ?? $arr_css[$i] = $head . "}";
? ? ? ? }
? ? ? ? return join(($nl?"n
gt;
n " :"nn "), $arr_css);
}


function script_highlight_note($str, $mode = true) {
? ? ? ? $color_note = "gray";
? ? ? ? $color_note = "gray";
? ? ? ? $color_note = "gray";
?"\"",""",$str);
? ? ? ? $str = preg_replace("/(.*)/isU ", "\ 1", $str);
? ? ? ? $str = $mode?"/*{$str}*/":"http://{$str}";
? ? ? ? return "{ $str}";
}


function script_highlight($str, $nl = true) {
? ? ? ? $color_1 = "紅色";
$color_2 = "藍(lán)色";
? ? ? ? $color_3 = "棕色";
? ? ? ? $color_4 = "綠色";
? ? ? ?str = htmlspecialchars($str);
? ? ? ? $str = str_replace("=","&equal;",$str);
? ? ? ? $str = str_replace("|", "&vertical"|
? ? ? ? $keywords = array(
? ? ? ? ? ? ? ? ? ? ? ? "{$color_1}"? ? ? ? ? ? "{$color_1}"? ?? ? ? ? ? ? ? ? ? ? ? "{$color_ 2}” =>佇列(“var”,“for”,“if”,“else”,“switch”,“case”,“函數(shù)”,“循環(huán)”,“繼續(xù)”,“break”,“> ” " , "!=", "==", "=", "&&", "&垂直;&垂直;"),
? ? ? ? ? ? ? ? ? ? ? ? “{$color_3}"? ? ? ? => array("window", "self", "this", "event", "document", "opener", "Navigator", "Math", "Array", "String", "Object", "函數(shù)", "數(shù)字"),
? ? ? ? ? ? ? ? ? ? ? ? );
? ? ? ? foreach($keywords as $p = $ $value ; $i? ? ? ? ? ? ? ? ? ? ? ? $str = preg_replace("/(W)(".$value[$i].")(W)/", "\1 \; \3", $str);
? ? ? ? ? ? ? ? }
? ? ? ? }
? ? ?? $str = preg_replace("/..|字型顏色='{$color_4}'>\2(", $str);
? ? ? ? $str = preg_replace("/.(w )(?!()/i" ,". \1", $str);
? ? ? ? $str = preg_replace("http:///([^n]*)n/e" ," script_highlight_note('\ 1 ', false)", $str);
? ? ? ? $str = preg_replace("http://*(.*?)*//es" ,"script_highlight_note('\1')", $str ); > $str = str_replace("t", "? ? ", $str);
? ? ? ? $str = str_replace("&equal;","=",$str);
? str ? ? $str = , "|",$str);
? ? ? ? return $nl?nl2br($str):$str;
}


function html_highhigh_attr($att) { = "紅色";
? ? ? ? $color_2 = "棕色";
? ? ? ? $color_3 = "黑色";
? ? ? ? $att = str_replace("\"),""
? ? ? ? $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? ? ? ? ? ? ? ? $att_list[$i] = trim($att_list[$i]);
? ? ? ? ?? ? $??>? ? ? ? ?? ? $(h._list) $(/place)(Iplace)( '"]?)(.*)(\3)/", "\ 1字型>\2字型>\3\4 字型>\3", $att_list [$i]);
? ? ? ? }
? ? ? ? return str_replace("|:s:|",|:ss:| " ", join(" ", $att_list));
}


function html_highlight($str) {
? ? ? ? $color_1 = " 紅色";
? ? ? ? $color_1 = " 紅色";
? ? ? $color_1 = " 紅色";
? ?藍(lán)色";
? ? ? ? $color_3 = "灰色";
? ? ? ? $str = str_replace("\"", """,$str);
? ? ? ?> )>(.*)/isU", $str, $arr_tmp);
? ? ? ? $arr_script = $arr_tmp[0];
? ? ? ? for($i=0; $i? ? ? ? ? ? ? ? $str = str_replace($arr_script[$i], "
::script_{$i}::
", $str);
::script_{$i}::]*)>(.* )/iseU", "'<script><br />'.script_highlight(str_replace('\"','"','\2'), false).'<font color='{$color_2}'></ SCRIPT>; '", $arr_script[$i]);<br>? ? ? }<br>? ? ? ? $str = preg_replace("/(<textarea[^>]*>)(.*)()/即U" ,"'\1'.htmlspecialchars('\2').'\3'", $str);<br>? ? ? ? $str = preg_replace("/<!--(.*)- -> /seU" ,"'<!--'.htmlspecialchars('\1').'-->'", $str);<br>? ? ? ? $str = preg_replace("/<style([^>gt ) ) ;]*)>(.*)/isU" ,"<!style\1>\2!>", $str);<br>? ? ? ? $str = preg_replace(" /< ( [a-z:] )s*(.*?)( /|/)?>/ise" ,"'< 字型顏色='{$color_2}'><\1 '.html_highlight_attr('\2').'\3></ font>'", $str);<br>? ? ? ? $str = preg_replace("/<(/[a-z: ] )>/ i" ,"<字體顏色='{$color_2}'><\1>", $str);<br>? ? ? ? $str = preg_replace("/<; (!--.*--) >/sU" ,"<字體顏色='{$color_3}'><\1>", $str);<br>? ? ? ? $str = preg_replace("/<!style([^>]* )>(.*)!>/iseU" ,"'<字體顏色='{$color_2}'>< ;樣式'.html_highlight_attr('\1').'><br / >'.css_highlight(str_replace('\"','"','\2'), false)。 ", $str);<br>? ? ? ? for($i=0; $i<; count($arr_script); $i ) {<br>? ? ? ? ? ? ?? $str = str_replace("<br>} :<br>", $arr_script[$i], $str);<br> }<br>? ? ? ? $str = str_replace("</ font>", "", $str);<br> $str = str_replace("</ b>", " ;", $str);<br>? ? ? ? $str = str_replace(" >", ">", $str);<br>? ?? ? $str = str_replace("??"," ?",$str);<br> $str = str_replace("t"," ? ?",$str);<br>? ? ? ? return nl2br($str);<br> ><br>function get_file_pic($filename) {<br>? ? ? ? 全域$root_path;<br>? ? ? ? $ext = str_replace("?),strrchr($filename,".)?); $root_path."images/mime_type/{$ext}.gif" ;<br>? ? ? ? return file_exists($pic)?"$pic":$root_path."images/mime_type/attch.gif";<br>$root_path."images/mime_type/attch.gif";<br>}<br>}<br>}< ><br><br>function get_dl_html($filename, $str = "") {<br>? ? ? ? return "<img src='".get_file_pic($filename)."' border='0' alt="PHP - Html Transfer Code_PHP教程" >; <a href='$filename'>".(empty($str)?basename($filename):$str)."";<br>}<br><br><br>函數(shù) get_attach_html ($filename, $id) {<br>? ? ? ? return "<img src='".get_file_pic($filename)."' border='0' alt="PHP - Html Transfer Code_PHP教程" >; <a href='attach_manage.php?method=download&id=$id'>$filename";<br>}<br><br><br>function get_vote_html($vote_idx, $message = " ") {<br>? ? ? ? 全域$db_host, $db_user, $db_pass, $db_name;<br>? ? ? ? $db = new DB_Manager($db_host, $db_user, $db_pass);< >SelectDB($db_name);<br>? ? ? ? $db->Query("select * from mnms_poll where id=".$vote_idx);<br>? ? ? ? $record = $db->Gstret ()<db-> "";<br>? ? ? ? $db->close();<br>? ? ? ? unset($db);<br>? ? ? ? if($record) {<br>? ? ? ? if($record) {<br>? ? ? ? if($record) {<br> ??? ? ? ? ? ? ? ? ? $if_vote = !( strpos($record[vote_user], "|{$username}|")===false) <br> strpos($record[vote_user], "|".GetIp() ."|")? ??>? ? ?? ? ?? ? ?str .= "<br>? ? ? ? ? ? ? ? ? ? ? ? <fieldset><br>? ? ? ? ? ?? he vote_title ] :$訊息)。 ??>? ? ? ? ? ? ? ? ? ? ? ?? ?< 表單名稱='poll' action='poll_manage.php????? ?<表格寬度='90年%'align='center'>";<br> $ dote_list = split(“ ::”,$ record [fote_list]); <br> $ potter_count = split(“ ::”,$ record [dovel_count]); <<br> $ potture_users = count(split(split(“ ”) n", $record[vote_user])) - 1;<br>? ? ? ? ? ? ? ? $vote_sum = array_sum($vote_count);<>? ? str? ? ? ? ? ? ? ?? ???< tr><td colspan='2'> 目前共有 <字體顏色='紅色'>{$vote_users}</字體> 人參與了這次投票";<br>? ? ? ? ? ? ? ? if($vote_sum==0) $vote_sum = 1;<br>? ? ?==0) $vote_sum = 1;<br>?$vote_list) ); $i ) {<br>? ? ? ? ? ? ? ? ? ? ? ? $str .= "<br>? ? ?"? ":"<輸入類型='隱藏'值='".$ vote_count[$i]."' name='vote_count[]'><輸入型別='".($record[vote_multi]=='Y'?"checkbox":"radio")."' name= 'vote []' value='{$i}'>").htmlspecialchars($vote_list[$i])."<td width='400'><img src='圖片/條/條". ($i 1).".gif' style="max-width:90%".ceil($vote_count[$i]*300/$vote_sum)."' style="max-width:90%" alt="PHP - Html Transfer Code_PHP教程" > 佔(zhàn)總票數(shù)的<font color='#990000' >".ceil((int)$vote_count[$i]*100/$vote_sum)."% tr>n";<br>? ? ? ? ? ? ? ? }<??>? ? ? ? ? ? ? }<??>? ? .??<tr><td colspan='2'align='center'><br>".($if_vote?"<b&gt ;您已經(jīng)投過票了!":"<input type='hidden' value='{$record[id]}' name='id'><input type='Submit' value='確定' name= '提交'>? ?< input type='reset' value='重置' name='reset'>")."";<br>? ? ? ? ? ? ? ? $str? ?? ? ? ? ? ? ? ? ? ? ? ?? ?? ? ? ? ? ? ? ? ? ? ? ";<br>? ? ? ? }<br>? ? ? ? return $str<? ? ? ? $str = str_replace("\"" ,""",$str);<br>? ? ? ? return "<br>? ? ? ? <表格對(duì)齊='center' width='550'><br>? ? 相信 ?10' name=Code>".htmlspecialchars($str)."<br><br>? ? ? ?? ???<輸入型別= 'button' value='執(zhí)行碼' onClick="str=this.parentNode.firstd. ;code_win=window.open('about:blank');doc=code_win.document;doc.open();doc.write (str);doc.close();code_win.focus();"><br> <input type='button' value='複製程式碼' onclick="try{window.clipboardData.setData('text' ,this.parentNode.firstChild.value);alert('將Codez 儲(chǔ)存到剪貼簿!'); }catch(e){alert('請(qǐng)複製選定的Codez!');this.parentNode.firstChild.select(); }"><br>? ? ? ?? ???<input type='button' value='儲(chǔ)存程式碼' onClick='儲(chǔ)存程式碼' onC. "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();"><br>? ? ? ?? ???(提示:先修改部分代碼)<br>? ? ??>";<br>}<br><br><br>function get_list_html($content, $ type = "") {<br>? ? ? ? $content = preg_replace("/(<br />)?[rn] />)?[rn] /> ", "n", $content);<br>? ? ? ? $content = preg_replace("/[ rn] /", "n", $content);<br>? ? ? ? $content = preg_replace("/^[n]*( .*)[n]*$/m", "\1", $content); <br>? ? ? ? $content = str_replace("n", "<li>", $content);<br> $content = "<ul type='$type'><li>; $contentn";<br>? ? ? ? return $content;<br>}<br><br><br> function html_trans($str) {<br>? ? ? ? $search??= array(" &",? ? ? ? ? ? ? ? "'",?? ? ? ? ? ?",? ? ? ? ">",? ? ? ? "??",? ? ? ? ? ? ? ? "t");<br>? ? ? $替換= 數(shù)組("&",? ? ? ? "'",? ? ? ? """,? ? ? ? " <",? ? ? ? ">",? ? ? ? "? ",? ? ? ">",? ? ? ?(str_replace($search, $replace, $str));<br> }<br><br><br>function link_url ($str) {<br>? ? ? ? $str = preg_replace("/((http|ftp|mms|rtsp|pnm|mail)://[w@:/ ?=&;#-%] )/i" , "<a href='\1' target='_blank'>\1", $str);<br>? ? ? ? $str = preg_replace("/ (w @(w .) [w] {2,3})/i", "<a href='mailto:\1'>\1", $str);<br>? ? ? ? $str = preg_replace("/(href|src) )='<a href=('. ')>[^<] '/iU", "\1=\2", $str);<br> return $str;<br>}<br><br><br>function htc2html_loop($str) {<br>? ? ? ? 全域$htc_list, $htc_list_att;< ??> 線上$?) for $ <br>? ? ? ? ? ? ? ? if(substr($value,0,5)= ="exec:"){<br>? ? ? ? ? ? ?/$ ?([^]] ))?]))*)[ /$key]/iexsU", substr($value,5), $str);<br>? ? ? ? ? ? ? ? }else {<br>? ? ? ? ? ? ? ? ? ? ? ? $str = preg_replace("/[$key]((.(?![$key(s?=s?([^]] )))? /ixsU", "$value", $str);<br>? ? ? ? ? ? ? ? }<br>? ? ? ? }<br>?? ? ? if(substr($value,0, 5 ) )=="exec:"){<br>? ? ? ? ? ? ? ? ? ? ? ? $str = preg_replace("/[$keys?=s?([^]] )](.(.(?!)(s? [ ^]] ))?]))*)[/$key]/iesxU", substr($value,5), $str);<br>? ? ? ? ? ? ? ? }??"/[ $鍵? " $value", $str);<br>? ? ? ? ? ? ? ? }<br>? ? ? ? }<br>? ? ? ? return $str. , $loop = 3) {<br>? ? ? ? 全域$htc_list_spl;<br>? ? ? ? $str = preg_replace("/([w ])s*/ixs","\1",$str);<br>< / s*([/w ])/ixs","\1",$str);<br>? ? ? ? foreach($htc_list_spl as $key => $value) {<br>? ? ? ? ? => $value) {<br>? ? ? ? ?. *)[/$key]/ixsU", $str, $arr_tmp);<br>? ? ? ? ? ? ? ? $arr_spl[$key] = $arr_tmp[0];<br>? $arr_spl[$key] = $arr_tmp[0];<br>? $arr_spl[$key] = $arr_tmp[0] $i<count($arr_spl[$key]); $i ) {<br>? ? ? ? ? ? ? ? ? ? ? ? $str = str_replace($arr_spl[$key][$i], "<br>::{$key}_{$n} ??>? ? ? ? ? ? ? ? ? ? ? ? if(substr($value,0,5)=="exec:"){<br>? ??key][$i] = preg_replace("/[$key](.*)[/$ key]/iexsU", substr($value,5), $arr_spl[$key][$i]);<br>? ? ? ? ? ? ? ? ? ? ??? ? ? ? $arr_spl[$key][$i] = preg_re地點(diǎn)(“ / [$ key](。*)[/$ key]/ixsu”,“ $ value”,$ arr_spl [$ key] [$ i] [$ i]); <br>} <br>} <br>} str = html_trans($str);<br>? ? ? ? while($loop-- > 0) {<br>? ? ? while ? ? ? ?=s?([^]] ))? ](.*)[/\1]/isU", $str)) Break;<br>? ? ? ? ? ? ? ? $str = htc2html_loop($str);<br>? ? $str = htc2html_loop($str);<br>? ?if($trans_url) $str = link_url($ str);<br>? ? ? ? foreach($htc_list_spl as $key => $value) {<br>? ? ?? ”$$ arr arr for$($ for $. ) ]); $i ) {<br> $str = str_replace("<br>::{$key}_{$i}::<br>", $arr_spl[$key][$i], $ str );<br>? ? ? ? ? ? ? ? }<br>? ? ? ? } <br>? ? ? ? 使用<br>echo htc2html ( $str);<br><br>好啦~~~~~~~~~<br> <br> <br><br><br>http://www.bkjia.com/PHPjc/314366.html<br><br>www.bkjia.com<br><br>true<br><br>http: //www.bkjia.com/PHPjc/314366.html<br><br>TechArticle<br><br>PHP - Html 轉(zhuǎn)換傳輸程式碼超文本碼,讀這東西已經(jīng)很豐富了,不過是這幾天自己實(shí)踐交流~~~~支援電壓喚醒和同標(biāo)籤靜音、混合...<br><p align="left"><div style="display:none;"> <span id="url" itemprop="url"></script>
本網(wǎng)站聲明
本文內(nèi)容由網(wǎng)友自願(yuàn)投稿,版權(quán)歸原作者所有。本站不承擔(dān)相應(yīng)的法律責(zé)任。如發(fā)現(xiàn)涉嫌抄襲或侵權(quán)的內(nèi)容,請(qǐng)聯(lián)絡(luò)admin@php.cn

熱AI工具

Undress AI Tool

Undress AI Tool

免費(fèi)脫衣圖片

Undresser.AI Undress

Undresser.AI Undress

人工智慧驅(qū)動(dòng)的應(yīng)用程序,用於創(chuàng)建逼真的裸體照片

AI Clothes Remover

AI Clothes Remover

用於從照片中去除衣服的線上人工智慧工具。

Clothoff.io

Clothoff.io

AI脫衣器

Video Face Swap

Video Face Swap

使用我們完全免費(fèi)的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱工具

記事本++7.3.1

記事本++7.3.1

好用且免費(fèi)的程式碼編輯器

SublimeText3漢化版

SublimeText3漢化版

中文版,非常好用

禪工作室 13.0.1

禪工作室 13.0.1

強(qiáng)大的PHP整合開發(fā)環(huán)境

Dreamweaver CS6

Dreamweaver CS6

視覺化網(wǎng)頁開發(fā)工具

SublimeText3 Mac版

SublimeText3 Mac版

神級(jí)程式碼編輯軟體(SublimeText3)

熱門話題

Laravel 教程
1600
29
PHP教程
1502
276
PHP中的對(duì)象關(guān)聯(lián)映射(ORM)性能調(diào)整 PHP中的對(duì)象關(guān)聯(lián)映射(ORM)性能調(diào)整 Jul 29, 2025 am 05:00 AM

避免N 1查詢問題,通過提前加載關(guān)聯(lián)數(shù)據(jù)來減少數(shù)據(jù)庫查詢次數(shù);2.僅選擇所需字段,避免加載完整實(shí)體以節(jié)省內(nèi)存和帶寬;3.合理使用緩存策略,如Doctrine的二級(jí)緩存或Redis緩存高頻查詢結(jié)果;4.優(yōu)化實(shí)體生命週期,定期調(diào)用clear()釋放內(nèi)存以防止內(nèi)存溢出;5.確保數(shù)據(jù)庫索引存在並分析生成的SQL語句以避免低效查詢;6.在無需跟蹤變更的場景下禁用自動(dòng)變更跟蹤,改用數(shù)組或輕量模式提升性能。正確使用ORM需結(jié)合SQL監(jiān)控、緩存、批量處理和適當(dāng)優(yōu)化,在保持開發(fā)效率的同時(shí)確保應(yīng)用性能。

VSCODE設(shè)置。 JSON位置 VSCODE設(shè)置。 JSON位置 Aug 01, 2025 am 06:12 AM

settings.json文件位於用戶級(jí)或工作區(qū)級(jí)路徑,用於自定義VSCode設(shè)置。 1.用戶級(jí)路徑:Windows為C:\Users\\AppData\Roaming\Code\User\settings.json,macOS為/Users//Library/ApplicationSupport/Code/User/settings.json,Linux為/home//.config/Code/User/settings.json;2.工作區(qū)級(jí)路徑:項(xiàng)目根目錄下的.vscode/settings

在PHP中構(gòu)建不變的物體,並具有可讀的屬性 在PHP中構(gòu)建不變的物體,並具有可讀的屬性 Jul 30, 2025 am 05:40 AM

ReadonlypropertiesinPHP8.2canonlybeassignedonceintheconstructororatdeclarationandcannotbemodifiedafterward,enforcingimmutabilityatthelanguagelevel.2.Toachievedeepimmutability,wrapmutabletypeslikearraysinArrayObjectorusecustomimmutablecollectionssucha

CSS暗模式切換示例 CSS暗模式切換示例 Jul 30, 2025 am 05:28 AM

首先通過JavaScript獲取用戶系統(tǒng)偏好和本地存儲(chǔ)的主題設(shè)置,初始化頁面主題;1.HTML結(jié)構(gòu)包含一個(gè)按鈕用於觸發(fā)主題切換;2.CSS使用:root定義亮色主題變量,.dark-mode類定義暗色主題變量,並通過var()應(yīng)用這些變量;3.JavaScript檢測prefers-color-scheme並讀取localStorage決定初始主題;4.點(diǎn)擊按鈕時(shí)切換html元素上的dark-mode類,並將當(dāng)前狀態(tài)保存至localStorage;5.所有顏色變化均帶有0.3秒過渡動(dòng)畫,提升用戶

如何在HTML中創(chuàng)建一個(gè)無序的列表? 如何在HTML中創(chuàng)建一個(gè)無序的列表? Jul 30, 2025 am 04:50 AM

要?jiǎng)?chuàng)建HTML無序列表,需使用標(biāo)籤定義列表容器,每個(gè)列表項(xiàng)用標(biāo)籤包裹,瀏覽器會(huì)自動(dòng)添加項(xiàng)目符號(hào);1.使用標(biāo)籤創(chuàng)建列表;2.每個(gè)列表項(xiàng)用標(biāo)籤定義;3.瀏覽器自動(dòng)生成默認(rèn)圓點(diǎn)符號(hào);4.可通過嵌套實(shí)現(xiàn)子列表;5.使用CSS的list-style-type屬性可修改符號(hào)樣式,如disc、circle、square或none;正確使用這些標(biāo)籤即可生成標(biāo)準(zhǔn)無序列表。

Java性能優(yōu)化和分析技術(shù) Java性能優(yōu)化和分析技術(shù) Jul 31, 2025 am 03:58 AM

使用性能分析工具定位瓶頸,開發(fā)測試階段用VisualVM或JProfiler,生產(chǎn)環(huán)境優(yōu)先Async-Profiler;2.減少對(duì)象創(chuàng)建,復(fù)用對(duì)象、用StringBuilder替代字符串拼接、選擇合適GC策略;3.優(yōu)化集合使用,根據(jù)場景選型並預(yù)設(shè)初始容量;4.優(yōu)化並發(fā),使用並發(fā)集合、減少鎖粒度、合理設(shè)置線程池;5.調(diào)優(yōu)JVM參數(shù),設(shè)置合理堆大小和低延遲垃圾回收器並啟用GC日誌;6.代碼層面避免反射、用基本類型替代包裝類、延遲初始化、使用final和static;7.持續(xù)性能測試與監(jiān)控,結(jié)合JMH

語義HTML對(duì)於SEO和可訪問性的重要性 語義HTML對(duì)於SEO和可訪問性的重要性 Jul 30, 2025 am 05:05 AM

semantichtmlimprovesbothseoandAccessibility formaningfultagSthatConveyContentsUrture.1)ItenhancesseothRoughBetterContterContenterContenterContenchyArchyWithProperHeadingLeheadinglevels,ifravedIndexingViaeLementLikeAnd,andsupportFortForrichSnippersingsundsustructussunddbuestussund.2)

如何以HTML表單創(chuàng)建搜索輸入字段 如何以HTML表單創(chuàng)建搜索輸入字段 Aug 02, 2025 pm 04:44 PM

Usetheelementwithinatagtocreateasemanticsearchfield.2.Includeaforaccessibility,settheform'sactionandmethod="get"attributestosenddatatoasearchendpointwithashareableURL.3.Addname="q"todefinethequeryparameter,useplaceholdertoguideuse

See all articles