【发布时间】:2017-01-26 07:31:41
【问题描述】:
我正在为自己开发一个 PHP 项目。我的文件夹结构是这样的:
index.php
head.php
config
config.php (database connection)
src
the other php files (ie. nav.php, stats.php)
helpers
the "oncerunning scripts" (ie. login.php, logout.php)
css
style.css
在 index.php 的开头以及 src 和 helpers 目录中的几乎每个 php 中,我都包含了“head.php”。如果我运行 index.php,一切正常,但如果我登录它会导致 WSOD,因为 login.php 获取 head.php (../head.php),但 head.php 不给它配置文件的路径(它转发说config.php在config/目录下,但是helpers目录下没有config目录)
我该如何调试?
【问题讨论】:
标签: php