Results 1 to 10 of 10
Aug 29, 2012, 01:50 #1
- Join Date
- Dec 2010
- 0 Post(s)
- 0 Thread(s)
I am working through the Build Database Driven Website with PHP and Mysql by Kevin Yank edition 4.
I am having a problem connecting to my ijdb database when I use: include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; I am able to connect to the database when I don't use the include but have the connection code in my controller file. So the issue is with the $_SERVER['DOCUMENT_ROOT'] which doesn't seem to work?
In the actual db.inc.php, I have ensured the connection details are correct: $link = mysqli_connect('127.0.0.1', '*****', '*******');
So is there any reasons why include $_SERVER['DOCUMENT_ROOT'] won't work? Do I need to specify something in a php config file or something?