Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/295.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
调用capabilities.php中未定义的函数wp_get_current_user()_Php_Wordpress - Fatal编程技术网

调用capabilities.php中未定义的函数wp_get_current_user()

调用capabilities.php中未定义的函数wp_get_current_user(),php,wordpress,Php,Wordpress,我有一个网站很久没有更新了。几天前,我的网站突然停止工作,并在error\u log文件中发现了此错误行 [18-Mar-2014 19:16:43 UTC] PHP Fatal error: Call to undefined function wp_get_current_user() in /home8/****/public_html/wp-includes/capabilities.php on line 1289 我已经尝试了我所知道的一切,几乎所有在网上找到的索赔。此次停机的可

我有一个网站很久没有更新了。几天前,我的网站突然停止工作,并在
error\u log
文件中发现了此错误行

[18-Mar-2014 19:16:43 UTC] PHP Fatal error:  Call to undefined function wp_get_current_user() in /home8/****/public_html/wp-includes/capabilities.php on line 1289
我已经尝试了我所知道的一切,几乎所有在网上找到的索赔。此次停机的可能原因和解决方案是什么?

如所示

wp_get_current_user()位于wp includes/pluggable.php中。 你有这个文件吗


(很抱歉,如果这是一个愚蠢的问题,我不知道wordpress)

解决方案是在plguin文件中包含可插入文件。包含此文件后,可以轻松解决您的问题。 require_once(ABSPATH./wp includes/pluggable.php');
$user\u info=wp\u get\u current\u user()

检查你的WP版本/重新安装核心WP文件。查看如何在不登录wordpress管理员的情况下检查我的wordpress版本?因为,我无法访问网站,只是files@Prakash,查找
wp includes\version.php
wp_get_current_user() is located in wp-includes/pluggable.php.