警告:strpos()[function.strpos]:空分隔符是什么意思?
我有这个:
if(strpos(''', $text) === false)
{
$text = str_replace(''', "'", $text);
}
Run Code Online (Sandbox Code Playgroud)
据猜测,我会说$text是一个空字符串(感谢马克指出细节)
编辑:另外,另一种猜测是您的参数顺序错误。strpos 的方法签名是
int strpos ( string $haystack , mixed $needle [, int $offset = 0 ] )
Run Code Online (Sandbox Code Playgroud)
请参阅http://php.net/manual/en/function.strpos.php
| 归档时间: |
|
| 查看次数: |
23307 次 |
| 最近记录: |