I have installed LAMP in ubuntu server. and its working good.. i have a php application which has a folder structure the root folder has
based on _GET the modules are included in index.php by
include('Modules/module2.php');
which works out perfectly well.. but in the module1.php when i try to include localhost.php by
include('/Database/localhost.php');
it doesn't work out. why is that it's not working..
NOTE:the same code works perfectly in WAMP in my windows 7.
You have a slash in front of "Database"
include('/Database/localhost.php');
the slash before /Database/ shouldn't be there because php tries to find the file from / (root folder).
Usually it's better to have a defined starting path point like:
define('DS', '/'); //Directory separator Unix
define('BASE_PATH', dirname(__FILE__).DS);
And then to use it as a base for all other included files.