Issue
I have a folder structure like this:
|Home
|____|Admin
|__________|Pages
|
|
|db_config.php
Files located in the home directory, I set the connection to the db_config.php file as follows:
include("db_config.php");
For files located in the pages directory, I set to:
include("..\\..\\db_config.php");
This setting works fine on my local and doesn't work when I up my website to 000webhost. What can I do to solve this problem? Thanks
Solution
Simply change
include("..\..\db_config.php");
to
include("../../db_config.php");
\ only works on windows, Linux uses / (which your host is using probably) BTW, always use /, windows accepts it too.
Answered By - Spoody
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.