引用地址:http://flyash.itcao.com/post_465.html
wordpress导出日志备份的时候出现类似下面的错误:
Warning : include_once(../../../wp-config.php) [ function.include-once ]: failed to open stream: No such file or directory in /plugins/wp-codebox/wp-codebox.php on line 32
看提示问题是出在wp-codebox.php文件,打开查看,根据文件所在的路径,要包含wordpress的配置文件的确是应该include_once(../../../wp-config.php),为什么会找不到文件呢?
尝试删除一个../导出仍然出错,再删除一个../导出正常,也就是include_once(../wp-config.php)
分析可能是导出日志的执行文件是export.php在/wp-admin/下,此时要包含wp-config.php是应该到上一级的目录中查找,而不是从wp-codebox.php寻找wp-config.php所需要的路径。
ps:
include_once “../../../wp-settings.php”; 这句也会提示错误,修改方法相同:include_once “../wp-settings.php”;