今天在帮朋友调试服务器的时候发现以前wp的404搞的伪静态竟然用不了了,然后就试着访问404出错页,结果首部出现
Notice: Undefined offset: 1 in D:wwwrootwraskseo404.php on line 5Notice: Undefined offset: 2 in D:wwwrootwraskseo404.php on line 5Notice: Undefined offset: 2 in D:wwwrootwraskseo404.php on line 7Notice: Undefined offset: 1 in D:wwwrootwraskseo404.php on line 12
Just to confirm, USING UNSET CAN DESTROY AN ENTIRE ARRAY. I couldn't find reference to this anywhere so I decided to write this.The difference between using unset and using $myarray=array(); to unset is that obviously the array will just be overwritten and will still exist.<?php$myarray=array("Hello","World");echo $myarray[0].$myarray[1];unset($myarray);//$myarray=array();echo $myarray[0].$myarray[1];echo $myarray;?>Output with unset is:<?HelloWorldNotice: Undefined offset: 0 in C:webpagesdainsidermyarray.php on line 10Notice: Undefined offset: 1 in C:webpagesdainsidermyarray.php on line 10Output with $myarray=array(); is:?><?HelloWorldNotice: Undefined offset: 0 in C:webpagesdainsidermyarray.php on line 10Notice: Undefined offset: 1 in C:webpagesdainsidermyarray.php on line 10Array?>
OK,问题解决,该睡觉了……
新闻热点
疑难解答