如何解决在 Drupal 6.13 中使用 PHP 5.3.0 的 deprecated 函数 ereg()

2021-12-29 00:00:00 php drupal drupal-6

有人知道如何解决下面的错误吗?

Anyone knows how to solve the error below?

已弃用:函数 ereg() 在 C:wampwwwincludesfile.inc 中的第 895 行已弃用

Deprecated: Function ereg() is deprecated in C:wampwwwincludesfile.inc on line 895

在 wamp server 2.0i 和 PHP 5.3.0 上安装 Drupal 6.13 后发生这种情况

It is happening after installing Drupal 6.13 on wamp server 2.0i with PHP 5.3.0

推荐答案

降低错误报告级别 低于 E_DEPRECATED.

PHP 5.3 引入了两个新的错误报告级别,E_DEPRECATED 和 E_USER_DEPRECATED,并且 - 在 PHP 的历史上第一次 - 他们已经开始放弃其 API 的旧部分.ereg_* 函数仍然可以工作,但此警告旨在让您知道嘿,这些函数将很快消失,可能在下一个主要修订版中).

PHP 5.3 introduced two new error reporting levels, E_DEPRECATED and E_USER_DEPRECATED and - for the first time in PHP's history - they've started to walk away from older parts of their API. The ereg_* function will still work, but this warning is intended to let you know that "hey, these function will be going away soon, probably in the next major revision).

相关文章