开发者

Wrong parameter count for str_replace() error

开发者 https://www.devze.com 2023-03-05 01:00 出处:网络
<?php $kw = $_POST[\"kw\"]; $kw= str_re开发者_开发百科place(\"*\",\"%\",$kw,$count); if($count > 1)
<?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

精彩评论

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