可参考上篇文章  链接 PHP数组简写模式

同样是PHP版本问题:in_array()函数 第二个参数应该为数组

但是 lnmp下,PHP5.3不报错,wamp下PHP5.5报以下错误:

echo "<br>For in_array:";
$arrstr="weibhd1";
if(in_array("weibhd1",$arrstr))
{
echo "ok!";
}else{
echo "no!";
}

( ! ) Warning: in_array() expects parameter 2 to be array, string given in D:\wamp\www\suiji.php on line 114

Call Stack

#

Time

Memory

Function

Location

1

0.0010

147376

{main}( )

..\suiji.php:0

2

0.0060

170912

in_array ( )

..\suiji.php:114

array!

Warning: in_array() expects parameter 2 to be array, string given in D:\wamp\www\suiji.php on line 26的更多相关文章

  1. Warning: setcookie() expects parameter 3 to be long, string given

    Warning: setcookie() expects parameter 3 to be long, string given 这个是我用php7.0会报这个错误, 切换低版本php5.6就ok

  2. Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in E:\\PHP\\wamp\\www\\lsr\\lsr.php on line 42

    类似于这样的错误: 其实大多数的情况下,都是SQL语句书写错了,特别是这种情况: select * from order; 应该写成: select * from `order`;(那不是单引号,而是 ...

  3. php 提示Warning: mysql_fetch_array() expects

    我的高度代码如下 include("conn.php"); if(!empty($_GET['id'])){         $sql="select * from ne ...

  4. PHP ECSHOP中 诡异的问题:expects parameter 1 to be double

    使用Ecshop给客户做了一个商城系统,在测试时发现后台在更改订单的配送方式时出现了以下问题 "PHP Warning: number_format() expects parameter ...

  5. Warning: count(): Parameter must be an array or an object that implements Countable in line 302解决方法

    ytkah在调试项目时又弹出一个警告Warning: count(): Parameter must be an array or an object that implements Countabl ...

  6. DataTables warning requested unknown parameter

    This is possibly the most cryptic warning message that DataTables will show. It is a short error mes ...

  7. DataTables warning : Requested unknown parameter '5' from the data source for row 0

    在该项目中我使用了jquery.dataTables.js来作为我的前端数据表格. 表格的官网地址:https://www.datatables.net/ 一.jsp部分代码片段如下: <tab ...

  8. MVC 5 调用存储过程参数配置方法-Procedure or function 'UP_***' expects parameter '@****', which was not supplied.

    MVC 5 调用存储过程参数配置方法-Procedure or function 'UP_***' expects parameter '@****', which was not supplied. ...

  9. DataTables warning : Requested unknown parameter '0' from the data source for row 0错误

    在做datatables的项目,从后台取得数据后,返回给datatables界面时会报下面的错误: DataTables warning : Requested unknown parameter ' ...

随机推荐

  1. CSS3 新怎的伪类选择器

    :first-of-type p:first-of-type 选择属于其父元素的首个 <p> 元素的每个 <p> 元素. :last-of-type p:last-of-typ ...

  2. IOS开发基础知识--碎片22

    1:设置有间距的表格行(UITableViewStyleGrouped) .设置section的数目,即是你有多少个cell - (NSInteger)numberOfSectionsInTableV ...

  3. Android Studio 运行出现 Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.

    转载请标明出处: http://www.cnblogs.com/why168888/p/5978381.html 本文出自:[Edwin博客园] 我引用compile 'com.squareup.re ...

  4. Linux - expect自动化远程登录脚本

    简单模式: #!/usr/bin/expect -f spawn ssh root@192.168.0.1 expect "*assword*" send "root\r ...

  5. Storm基础

    Storm基本概念 Storm是一个开源的实时计算系统,它提供了一系列的基本元素用于进行计算:Topology.Stream.Spout.Bolt等等. 在Storm中,一个实时应用的计算任务被打包作 ...

  6. Linux 客户端访问 NFS报Permission Denied错误

    在Linux服务器上访问NFS共享目录时,报错:Permission denied. 如下截图所示: 因为这个NFS是系统管理员配置的,我又不了解具体情况,而系统管理员休假中,联系不上.那么我只能先多 ...

  7. Linux sendmail发送邮件失败诊断案例(一)

    在新服务器上测试sendmail发送邮件时,发现邮件发送不成功,检查日志文件发现如下错误(Notice:由于涉及公司服务器,邮箱等,故下面hostname.邮箱地址等信息使用xxx代替) tail - ...

  8. 阿里云centos安装svn和submin

    概述 没有找到可以让团队方便使用的云盘,暂时搭建一个svn凑合用一下 svn有三种安装方式 安装方式 服务程序 服务协议 用户和密码 授权 系统配置 svn独立安装 svnserve svn pass ...

  9. jQuery 中的 39 个技巧

    1.当document文档就绪时执行JavaScript代码. 我们为什么使用jQuery库呢?原因之一就在于我们可以使jQuery代码在各种不同的浏览器和存在bug的浏览器上完美运行. <sc ...

  10. 【转】hive导入数据出现NULL

    在把hdfs上数据迁移到hive中的表时,若出现数据位NULL,是因为没有指定列分隔符. 由于hive默认的分隔符是/u0001(Ctrl+A),为了平滑迁移,需要在创建表格时指定数据的分割符号,语法 ...