由于现在本地用的php5.3几的版本,别人发过来的源码好多提示。
session_is_registered()函数在PHP4.6以后的版本中好像已经淘汰了,判断是否存在用isset()函数: if(!isset($_SESSION["username"])){ header("location:index.php?login=log"); }在php5.3中官方废弃了很多函数,其中目前本人收集到的有 ereg(); eregi(); ereg_replace(); eregi_replace(); set_magic_quotes_runtime(); split(); mysql_close(); Function ereg_replace()解决办法 1.使用php5.2版本 2.如果一定要用php5.3,请修改php.ini中下面代码 ;extension=php_mbstring.dll 修改为; extension=php_mbstring.dll ;mbstring.func_overload = 0 修改为; mbstring.func_overload = 7