开发者

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);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜