Fatal error: Call to undefined function: stripos()

Google AD

为什么会有这样的错误 “Fatal error: Call to undefined function: stripos()”?

查看了下手册:

stripos
(PHP 5)
stripos — Find position of first occurrence of a case-insensitive string
原来他是个PHP5作用的函数,但是网路上还是有很多服务空间是用的 php 4.3, 那么可以用下面的方法解决这个问题:

if(!function_exists('stripos')) {
 function stripos($haystack, $needle, $offset = 0) {
  return strpos(strtolower($haystack), strtolower($needle), $offset);
 }
}

相关文章

  1. “Fatal error: Maximum execution time”
  2. php代码出现错误分析详解
  3. 《The Call》- 《纳尼亚传奇2:凯斯宾王子》片尾曲
  4. PHPlist Error:Database error 1146 Table ‘DBname.user_group’ doesn’t exist
  5. PHP常用函数

关于站长

姚迎迎,生于 1985年3月2日, 江苏大丰人士 。修行于福州大学软件学院

Taobao AD

Google 广告