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

我的问题是,在使用备份伙伴将网站迁移到另一台服务器后,我遇到了死亡的白屏.

我在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).所以我希望对其他人有所帮助.

相关文章

统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
前言 之前做了微信登录,所以总结一下微信授权登录并获取用户...
FastAdmin是我第一个接触的后台管理系统框架。FastAdmin是一...
之前公司需要一个内部的通讯软件,就叫我做一个。通讯软件嘛...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...