this is probably a path inclusion problem. To fix this, in the file problem.php
do the following:
echo realpath (dirname(__FILE__));
which will output something like
/ var / WWW / HTML / MyFilePath /
your file, the .php problem will be in this directory.
now if database.php is also in this directory, you can do it
$filepath = realpath (dirname(__FILE__)); require_once($filepath."/database.php");
if it's somewhere else you can do
require_once($filepath."/../../path/to/somewhere/else/database.php");
Zak
source share