每次当我尝试使用require_once("Connectdb.php"),网页显示什么


Eveytime when I try to use require_once("Connectdb.php"), the webpage shows nothing

我正在使用Bluehost网络托管和我正在建设的网站位于子域,每次当我试图使用

require_once("Connectdb.php") or die ("require fail!");

这个网页什么也没有显示,只是一个空白页。

我试过使用

require_once(dirname(dirname(__FILE__))."/Connectdb.php");

你的脚本是"白屏",因为它有一个错误,但你的服务器有错误关闭,所以没有输出。把这些放在第一个文件的顶部(可能是索引?)

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

正常的错误应该显示在页面上。一个致命的错误(如require_once)仍然会阻止脚本执行。