salut!je vien il y a quelques heures de finir mon site tout fonctione parfaitement en local mais lorsque je l'est publier il m'ecris une erreur a la page ou j'ai la fonction "highlight_string".mon hebergeur utilse la version php4 j ai fait une petite recherche dans google et aparament vu ce que j ai lu cela devrai fonctionner.je vous note ci-dessous l'erreur en question:
Warning: Wrong parameter count for highlight_string() in /storage/1/serveurs/www/e-ghosting/httpdocs/damish/derniers_codes.php on line 51
et voici ma fonction:
function ColorPhpCode($Code) {
$Color['html'] = '#000080';
$Color['comment'] = '#FF9000';
$Color['default'] = '#008000';
$Color['keyword'] = '#0C00FF';
$Color['string'] = '#CD0202';
$color['php'] = 'red';
$ret = '<table>';
$ret .= '<tr><td>';
$ret .= highlight_string($Code, true);
$ret .= '</td></tr>';
$ret .= '</table>';
$in = array(
'`</?code>`i',
'`<(?:font color="|span style="color: )' . ini_get('highlight.html') . '">(.+?)</(?:font|span)>`si',
'`<(?:font color="|span style="color: )' . ini_get('highlight.comment') . '">(.+?)</(?:font|span)>`si',
'`<(?:font color="|span style="color: )' . ini_get('highlight.default') . '">(.+?)</(?:font|span)>`si',
'`<(?:font color="|span style="color: )' . ini_get('highlight.keyword') . '">(.+?)</(?:font|span)>`si',
'`<(?:font color="|span style="color: )' . ini_get('highlight.string') . '">(.+?)</(?:font|span)>`si',
'` `si'
);
$out = array(
'',
'<span class="html">$1</span>',
'<span style="color:' . $Color['comment'] . '">$1</span>',
'<span style="color:' . $Color['default'] . '">$1</span>',
'<span style="color:' . $Color['keyword'] . '">$1</span>',
'<span style="color:' . $Color['string' ] . '">$1</span>',
' '
);
return preg_replace($in, $out, $ret);
}
echo "<strong><table width='80%' bgcolor='#ffffff' border='1' bordercolor='#BADFF9'align='center' cellpadding='0' cellspacing='0'><tr><td>";
echo ColorPhpCode($donnees['source_code']);
echo "</td></tr></table></strong>";
}
cela vien t'il de mon code ou de mon hebergeur?que doi je je faire pour retablir cette erreur?
PS:je suis sur: http://www.e-ghosting.com
merci de vos reponses
D@mish