Program-E Php目标错误

Program-E Php目标错误,php,artificial-intelligence,aiml,Php,Artificial Intelligence,Aiml,所以我正在使用一个名为program-e的PHP-AIML程序,它运行得很好,我知道它会很稳定,因为它是在不久前完成的,但它是针对PHP4.0.4的,现在我使用的是5.0,所以我不知道该怎么办 我的foreach()函数的代码如下: // Turn this off in case people have it on. set_magic_quotes_runtime(0); // Can't turn off magic quotes gpc so just redo what it did

所以我正在使用一个名为program-e的PHP-AIML程序,它运行得很好,我知道它会很稳定,因为它是在不久前完成的,但它是针对PHP4.0.4的,现在我使用的是5.0,所以我不知道该怎么办

我的foreach()函数的代码如下:

// Turn this off in case people have it on.
set_magic_quotes_runtime(0);

// Can't turn off magic quotes gpc so just redo what it did if it is on.
if (get_magic_quotes_gpc()) {
    foreach($HTTP_GET_VARS as $k=>$v)
        $HTTP_GET_VARS[$k] = stripslashes($v);
    foreach($HTTP_POST_VARS as $k=>$v)
        $HTTP_POST_VARS[$k] = stripslashes($v);
    foreach($HTTP_COOKIE_VARS as $k=>$v)
        $HTTP_COOKIE_VARS[$k] = stripslashes($v);
}
这是我在页面上看到的错误:

Warning: Invalid argument supplied for foreach() in /home/content/80/8657080/html/e/src/admin/dbprefs.php on line 42

Warning: Invalid argument supplied for foreach() in /home/content/80/8657080/html/e/src/admin/dbprefs.php on line 44

Warning: Invalid argument supplied for foreach() in /home/content/80/8657080/html/e/src/admin/dbprefs.php on line 46

那么我如何解决这个问题呢。

从PHP手册的以下条目:

从PHP5.0.0开始,长PHP预定义变量数组可能是 使用寄存器长数组指令禁用

这意味着(不推荐的)
$HTTP\u GET\u VARS
$HTTP\u POST\u VARS
$HTTP\u COOKIE\u VARS
可能使用register\u long\u arrays指令关闭

无论如何,你不应该使用这些工具,因为它们已经被弃用很长时间了。相反,使用
$\u GET
$\u POST
,和
$\u COOKIE
超全局


最后,我不想让人沮丧,但我个人会尽可能远离任何针对PHP版本<5.3进行优化的东西。

我在godaddy上,所以我使用他们得到的东西,我会尝试新的get-post cookie标头。非常感谢,我对简单的PHP非常了解,但我不知道这些变量已经更改,或者甚至不存在,我只知道新的。。。谢谢@很高兴我能帮上忙