![个人头像照片](https://ucc.alicdn.com/avatar/avatar3.jpg)
暂无个人介绍
已经使用过了debug模式,其实网站现在仍处于debug模式中,现在没有任何错误提示。最早的时候被恶意注入的代码已经被清理,但是一篇垃圾文章仍在:http://computational-communication.com/topics/blog/
我在wp_config.php中使用的debug代码如下:
/**
* This will log all errors notices and warnings to a file called debug.log in
* wp-content only when WP_DEBUG is true. if Apache does not have write permission,
* you may need to create the file first and set the appropriate permissions (i.e. use 666).
*/
define( 'WP_DEBUG', true ); // Or false
if ( WP_DEBUG ) {
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', true );
@ini_set( 'display_errors', 1 );
}
// Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
define( 'SCRIPT_DEBUG', true );
使用wp-no-white-screen(https://github.com/stracker-phil/wp-no-white-screen/)进行辅助debug,发现一处可疑的地方:
Fatal error: Class 'WP_Screen' not found in /wp-admin/includes/class-wp-screen.php
发现这段代码是:
/**
* Set the current screen object
*
* @since 3.0.0
*
* @param mixed $hook_name Optional. The hook name (also known as the hook suffix) used to determine the screen,
* or an existing screen object.
*/
function set_current_screen( $hook_name = '' ) {
WP_Screen::get( $hook_name )->set_current_screen();
}
WP_Screen并没有定义!这很不应该,搜索应该引用:
require_once(ABSPATH . '/wp-admin/includes/class-wp-screen.php');
首先在上面代码中引用class-wp-screen.php
然后,但是我在/wp-admin/includes/路径下找不到class-wp-screen.php。于是在github.com/wordpress/wordpress里找到了这个php,放进这里。
于是我终于看到了管理界面!
我也出现这个问题,还没有解决掉,更恶心的是无法登录管理后台了。