gpt4 book ai didi

PHP - 什么是警告 : strpos() [function. strpos] : Empty delimiter in mean?

转载 作者:可可西里 更新时间:2023-11-01 13:20:15 27 4
gpt4 key购买 nike

Warning: strpos() [function.strpos]: Empty delimiter 是什么意思?

我有这个:

    if(strpos(''', $text) === false)
{
$text = str_replace(''', "'", $text);
}

最佳答案

我猜,$text 是一个空字符串(感谢 Mark 指出细节)

编辑:另外,另一个猜测是您的参数顺序错误。 strpos的方法签名是

int strpos ( string $haystack , mixed $needle [, int $offset = 0 ] )

参见 http://php.net/manual/en/function.strpos.php

关于PHP - 什么是警告 : strpos() [function. strpos] : Empty delimiter in mean?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4105067/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com