DB location

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Stela
Forum Commoner
Posts: 46
Joined: Tue Aug 12, 2008 12:38 pm

DB location

Post by Stela »

Hello!

I'm doing a CMS following an on-line tutorial, I'm running a server on my Mac with MAMP.

But I can't understand the Location of the DB, here's the code for that part

class SystemComponent
{
var $settings;

function getSettings()
{
//System Variables
$settings['siteDir'] = 'path/to/intranet/';

//Database Variables
$settings['dbhost'] = 'hostname';
$settings['dbusername'] = 'dbuser';
$settings['dbpassword'] = 'dbpass';
$settings['dbname'] = 'mydb';

return $settings;
}
}

I can run php code just fine, I have the files on a folder, I can create DBs using MySQL and with the MAMP home page, but whats the 'siteDir' and 'path/to/intranet'?

Thanks for the help!
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: DB location

Post by jaoudestudios »

Not too sure on MAP, but on LAMP it is /var/www/html/
Stela
Forum Commoner
Posts: 46
Joined: Tue Aug 12, 2008 12:38 pm

Re: DB location

Post by Stela »

Thanks for the help.

Actually the answer was on the Start Page of MAMP, it's 'localhost'

:oops:
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: DB location

Post by jaoudestudios »

Sorry did not realise you wanted the url, I thought you wanted the absolute path from root.

Well you found it :)
Stela
Forum Commoner
Posts: 46
Joined: Tue Aug 12, 2008 12:38 pm

Re: DB location

Post by Stela »

Sorry, you're right, when I post for the first time I really wanted the full path, but then I found it (//sites) and then I couldn't find the url.

Thanks again!
Post Reply