il montre "- Debug: Undefined variable: wordscut on line 168 of /wp-content/theme
"fonction wordpress _e
function cutstr($string, $length) {
$string =strip_tags($string);
preg_match_all("/[x01-x7f]|[xc2-xdf][x80-xbf]|xe0[xa0-xbf][x80-xbf]|
[xe1-xef][x80-xbf][x80-xbf]|xf0[x90-xbf][x80-xbf][x80-xbf]|[xf1-xf7][x80-xbf][x80-xbf][x80-xbf]/", $string, $info);
for($i=0; $i<count($info[0]); $i++) {
$wordscut.= $info[0][$i];
$j= ord($info[0][$i]) > 127 ? $j + 2 : $j + 1;
if ($j > $length - 3) {
return $wordscut." ...";
}
}
return join('', $info[0]);
}
ce qui précède est ma fonction. Je sais en php, il est juste si une variable ne soit déclarée avant qu'il ne soit used.why il montre » Undefined variable: wordscut, j
..... merci
2, * requis:.. Non-printable characters were found in the '''functions.php'
« » fichier Vous voudrez peut-être pour vérifier ce fichier pour les erreurs.
ce qui est Non-printable characters
.Comment corriger? merci.
Quelle importance est '_e()'? – Sampson
pour la question # 2. Il est préférable de le diviser en une autre question. – ariefbayu