Cpanel username and path question


#1

Hi guys

I am trying to install a script in my dreamhost account, and they are asking for a path like -

/home/MY CPANEL USERNAME/public_html/

By googling, I found that for dreamhost, it should (?) be -

/home/MY CPANEL USERNAME/mydomain.com/

now since I want to install the script in mydomain.com/mydirectory/ , I guess my script path will be

/home/MY CPANEL USERNAME/mydomain.com/mydirectory/

is it correct? Besides, how can I know what’s my cpanel username for DH? When I sign in my DH control panel, I use my email address, and no username …

any tips / help friend?
thanks

Web’s ultimate debate center - www.SharpDebate.com


#2

If you are using PHP, use the server variable $_SERVER[‘DOCUMENT_ROOT’] as the path. That equates to /home/username/domainfolder/. For example, if you have a folder called includes in your web root, containing a file that connects to your database, the code for the include would be something like this:<?php include($_SERVER['DOCUMENT_ROOT']."/includes/db.php"); ?>That is functionally equivalent to: <?php include("/home/username/domainfolder/includes/db.php"); ?>--------
Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]


#3

Yes that path looks okay.

You can find out your username under the ‘users|manage users’ section.

Then just replace MY CPANEL USERNAME with the username.


Norm