1
strlen的顯示錯誤的字符在標題的末尾時爲E的表現「......」的strlen()顯示錯誤的字符當微調標題WordPress的
的是我的代碼:
<?php $title = the_title('', '', false);
$title = (strlen($title)<60) ? $title : substr($title,0,50)."...";
echo $title;
<?php endforeach; ?>
Iam得到這個錯誤:警告:strlen()期望恰好有1個參數,2給出/ home /oranews/public_html/wp-content/themes/oranews/loop-single.php 44行 –
我說'mb_strlen()'爲什麼你仍然在使用'strlen()'? –
我使用它mb_strlen()但我的頁面顯示空白:( –