Wrong parameter count for str_replace() error
<?php
$kw = $_POST["kw"];
$kw= str_re开发者_开发百科place("*","%",$kw,$count);
if($count > 1)
{
echo "not supported";
exit;
}
...
?>
I'm getting this warning "Wrong parameter count for str_replace() error".
where am I wrong?
Thanks.
What version of PHP are you using? I suspect <5.0.0
From http://php.net/manual/en/function.str-replace.php
5.0.0 The count parameter was added.
try
$kw= str_replace("*","%",$kw,&$count);
精彩评论