本文實(shí)例講述了php源碼分析之DZX1.5字符串截?cái)嗪瘮?shù)cutstr用法。分享給大家供大家參考。具體分析如下:
?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 <?php /** * 函數(shù)來(lái)源DZX1.5,文件所在 /source/function/function_core.php */ define('CHARSET','UTF-8'); function cutstr($string, $length, $dot="...") { if(strlen($string)<=$length) { return $string; } if(strtolower(CHARSET) == "utf-8") { $n = $tn = $noc = 0; while($n < strlen($st運(yùn)行結(jié)果如下:
測(cè)試數(shù)據(jù)庫(kù)ablci1020...
希望本文所述對(duì)大家的php程序設(shè)計(jì)有所幫助
新聞熱點(diǎn)
疑難解答
圖片精選
網(wǎng)友關(guān)注