
之前用360检测到如下错误,类似的出现过好几次了,暂且记录下来,路径用的其他地方的,但问题及解决办法是一样的。
注:以下方案仅在使用虚拟机无法改php等配置的网站上实验过。
http://localhost/blog/wp-includes/registration-functions.php
页面出现
Fatal error: Call to undefined function _deprecated_file() in /Users/yuexiaosheng/WEB/php/blog/wp-includes/registration-functions.php on line 8

在出问题的php文件里
if(!defined('WP_USE_THEMES'))
{
exit('Hello world!');
}exit中的语句应该可以随便改,这仅是一个输出语句。
效果图:

@_deprecated_file( basename(__FILE__), '2.1', null, __( 'This file no longer needs to be included.' ) );