Old talk over-php Chinese characters intercept

xiaoxiao2021-03-06  64

It seems that this problem will always ask for the forum to ask the functions used to use today. I saw the PHP column. The main method is simple. First, we look at the two methods for previous applications ---------- -------------------------------------------------- ----- Function Msubstr ($ Str, $ START, $ LEN) {$ Strlen = $ Start $ Len; for ($ I = 0; $ Strlen; $ I ) {if (ORD (Substr STR, $ I, 1))> 0xA0) {$ Tmpstr. = Substr ($ STR, $ I, 2); $ I ;} else $ TMPSTR. = Substr ($ Str, $ I, 1);} Return $ TMPSTR;} ------------------------------------ = $ START $ LEN) BREAK IF (ORD (Substr ($ Str, $ I, 1))> 0xA0) {IF ($ Clen> = $ START) $ TMPSTR. = SUBSTR ($ Str, $ I, 2); $ I ;} else { IF ($ Clen> = $ start) $ TMPSTR. = SUBSTR ($ Str, $ I, 1);}} RET URN $ TMPSTR;} Function Showsh ($ STR, $ LEN) {$ Tempstr = Csubstr ($ Str, 0, $ LEN); if ($ STR <> $ TEMPSTR) $ TEMPSTR. = "..."; // What is the end of it? Return $ TEMPSTR;} Let's take a look at the method of 唠叨, simple? $ G = 19; $ text = "How to display a long headline of the news only some words , Replace it later with ... "Echo Strlen ($ text) <=

转载请注明原文地址:https://www.9cbs.com/read-110600.html

New Post(0)