Warning:in_array() [function.in-array]:Wrong datatype for se
来源:学生作业帮 编辑:神马作文网作业帮 分类:综合作业 时间:2024/11/11 17:49:34
Warning:in_array() [function.in-array]:Wrong datatype for second argument in D:\wa...on line 12
$filelist=array("muban","login","check");
function filename()
{
$dir=basename($_SERVER['REQUEST_URI'],".php");
if(in_array("$dir",$filelist,TRUE)) //第12行
return $dir;
}
$filelist=array("muban","login","check");
function filename()
{
$dir=basename($_SERVER['REQUEST_URI'],".php");
if(in_array("$dir",$filelist,TRUE)) //第12行
return $dir;
}
不能把in_array这个函数放到function里面
$filelist=array("muban","login","check");
$dir=basename($_SERVER['REQUEST_URI'],".php");
if(in_array($dir,$filelist, TRUE))
echo $dir;
这样修改即可
再问: 为什么?我就是需要把它放在函数里面啊,还有那时个什么原理呢?虽然已经有了别的解决方案了,但想知道问题的本质是什么
再答: php是弱语言
$filelist=array("muban","login","check");
$dir=basename($_SERVER['REQUEST_URI'],".php");
if(in_array($dir,$filelist, TRUE))
echo $dir;
这样修改即可
再问: 为什么?我就是需要把它放在函数里面啊,还有那时个什么原理呢?虽然已经有了别的解决方案了,但想知道问题的本质是什么
再答: php是弱语言
Warning:array_key_exists() [function.array-key-exists]:The f
Warning:mysql_connect() [function.mysql-connect]:Lost connec
Warning:include_once(Mage_Core_functions.php) [function.incl
Warning:require_once(data/function.php) [function.require-on
英语翻译Write a function that dynamically allocates an array of
user\main.c(192):warning:#223-D:function "NVIC_PriorityGroup
warning C4996:'scanf':This function or variable may be unsaf
Warning:mysql_connect() [function.mysql-connect]:Can't conne
warning:function "SystemInit" declared implicitly.我在STM32F10
LESSON1.C(18):warning C206:'delay':missing function-prototyp
sat (because of pleading in vain for improved maintenance se
number of points in array//英语翻译