Notice: Use of undefined constant array_merge - assumed 'array_merge' in D:\workspace\php\daikuanA\checkpostandget.php on line 19Notice: Undefined variable: HTTP_POST_VARS in D:\workspace\php\daikuanA\checkpostandget.php on line 21Notice: Undefined variable: HTTP_GET_VARS in D:\workspace\php\daikuanA\checkpostandget.php on line 21Warning: array_merge() [function.array-merge]: Argument #1 is not an array in D:\workspace\php\daikuanA\checkpostandget.php on line 21Warning: Invalid argument supplied for foreach() in D:\workspace\php\daikuanA\checkpostandget.php on line 35出错位置//合并$_POST 和 $_GET
if(function_exists(array_merge))
{
$ArrPostAndGet=array_merge($HTTP_POST_VARS,$HTTP_GET_VARS);
}PHP函数

解决方案 »

  1.   

    if(function_exists('array_merge'))$HTTP_POST_VARS,$HTTP_GET_VARS 已经废弃的东西,就不要用了,用$_POST 和 $_GET 代替。
      

  2.   

    第一个和最后两个warnning都是由于第二和第三个引起的,连带关系。第二和第三个问题是由于php.ini中register_long_arrays没有打开引起。不过$HTTP_POST_VARS,$HTTP_GET_VARS都是php4的写法,早已不推荐使用,直接用$_POST和$_GET代替即可。想要取源数据不经过处理的,可以用file_get_contents( "php://input ");来代替HTTP_RAW_POST_DATA和HTTP_RAW_GET_DATA