加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

php – WordPress无法追踪的移民死亡白屏

发布时间:2020-12-13 17:21:09 所属栏目:PHP教程 来源:网络整理
导读:我的问题是,在使用备份伙伴将网站迁移到另一台服务器后,我遇到了死亡的白屏. 我在Wordpress中启用了调试模式但仍然没有错误,只是白屏. 所以我尝试删除所有文件并重新上传它们并按原样离开数据库(由BackupBuddy导入的数据库),但它仍然给我白屏. 所以我试图追
我的问题是,在使用备份伙伴将网站迁移到另一台服务器后,我遇到了死亡的白屏.

我在Wordpress中启用了调试模式但仍然没有错误,只是白屏.

所以我尝试删除所有文件并重新上传它们并按原样离开数据库(由BackupBuddy导入的数据库),但它仍然给我白屏.

所以我试图追踪白屏发生的特定线,并陷入一种奇怪的行为.

在/wp-content/plugins/woocommerce/widgets/widget-init.php中:

include_once('widget-cart.php');
include_once('widget-featured_products.php');
include_once('widget-layered_nav.php');
include_once('widget-price_filter.php');
include_once('widget-product_categories.php');
include_once('widget-product_search.php');
include_once('widget-product_tag_cloud.php');
include_once('widget-recent_products.php');
include_once('widget-top_rated_products.php');

>当我添加“die(‘boom’);”之前
“include_once( ‘插件-price_filter.php’);” =热潮打印出来.
>当我添加“die(‘boom’);”后
“include_once( ‘插件-price_filter.php’);” =热潮未打印
出.

所以可以肯定地说这个bug在widget-price_filter.php里面吗?

问题是当我在widget-price_filter.php的开头添加一个die时,它不会打印出来.这就像发生错误的行无处可寻.

可能是什么原因造成的?

解决方法

So it’s safe to say that the bug is inside widget-price_filter.php right?

是的,完全(并且您遵循正确的调试方式).

The problem is when I add a die at the beginning of widget-price_filter.php,it does not print it out. It’s like the line where the error occurred is nowhere.

如果(正如你所说的那样)你已经添加了死(‘你好’);在顶部(在<?php之后)并且它没有出现 - 这意味着存在两个问题之一
>找不到档案
>该页面中的语法错误.

您可以通过以下三种方式解决:

>检查php错误日志(如果您有权访问)
>在调用“include_one”之前(在init.php中)添加:

error_reporting(E_ALL);
ini_set('display_errors','on');

>完全清空代码(只需离开<?php die('HELLO');?>,检查出现的内容然后逐位添加代码.

如果你有2号路线,记得在你工作的时候取出它.很重要!

?1实际上花时间尝试在发布之前自己解决(使用echo和die).所以我希望对其他人有所帮助.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读