Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/11.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
Php 我通过ftp上传了wordpress,但它没有';行不通_Php_Wordpress_Error Handling - Fatal编程技术网

Php 我通过ftp上传了wordpress,但它没有';行不通

Php 我通过ftp上传了wordpress,但它没有';行不通,php,wordpress,error-handling,Php,Wordpress,Error Handling,PHP致命错误:在第233行的/home/name/public\u html/wp includes/class-wp-locale.PHP中调用未定义的函数get\u bloginfo() 第233行 if ( 'rtl' === $this->text_direction && strpos( get_bloginfo( 'version' ), '-src' ) ) { $this->text_direction = 'ltr';

PHP致命错误:在第233行的/home/name/public\u html/wp includes/class-wp-locale.PHP中调用未定义的函数get\u bloginfo()

第233行

if ( 'rtl' === $this->text_direction && strpos( get_bloginfo( 'version' ), '-src' ) ) {
        $this->text_direction = 'ltr';
        add_action( 'all_admin_notices', array( $this, 'rtl_src_admin_notice' ) );
    }

我找到了答案。只需从wp includes/class-wp-locale.php中的第233行删除get_bloginfo即可
而且不再出现PHP致命错误……感谢我自己:)

上传过程中似乎丢失了一些文件

您永远不能更改核心文件,因为新的wordpress更新出现时,您将再次遇到麻烦

最好的做法是临时注释(或删除)该行:

// if ( 'rtl' === $this->text_direction && strpos( get_bloginfo( 'version' ), '-src' ) ) {
//   $this->text_direction = 'ltr';
//   add_action( 'all_admin_notices', array( $this, 'rtl_src_admin_notice' ) );
// }
之后,您可以访问wp管理页面。然后转到
仪表板->更新->立即重新安装


这是解决这个问题最安全的方法。希望有帮助。

我的MySQL服务器服务关闭了…

有些相当重要的东西没有上传,我想说的是,请检查此路径中的
general template.php
文件
/wp includes/general template.php
,您可能需要重新上传此文件。如果这个文件还没有完全上传,那么你可能还需要重新上传你所有的wordpress文件@RiggsFolly这是非常不寻常的……有时几个小时不产生错误……有时几秒钟就产生错误……。我不知道是什么造成了这个错误。@EhsanT我已经通过wordpress上传了它。如果有时你收到这个错误,而其他时候你没有,那么我想你的主机提供商可能有问题吧!如果在出现此错误期间,您查看了
/wp includes/general template.php
文件的源代码,那么您会看到什么?您能在其中找到
get\u bloginfo()
函数吗?感谢您分享此信息。但这不是答案,你可以很容易地编辑你的问题,并将这些数据添加到你的帖子中,作为你问题的更新。@EhsanT我知道这不是答案。我无法将代码粘贴到注释框中。我认为你是对的。托管提供商公司的服务器出现问题。这是我最后的错误日志。“尝试获取锁时发现死锁;尝试重新启动事务”‌插入
wpوu选项
“此答案暂时有效,但不安全。永远不要更改核心文件