若使用substr($prodcname,0,20)時,碰到中文時又會印出格子外。 ... if($r>0) { throw new \Exception('bad utf8 encoding'); } } return substr($str, 0, $k); }.
確定! 回上一頁