Jump to content

Need help finding Paths on Free Host


doubledee

Recommended Posts

I am using the free web host http://www.byethost2.com/ and need help figuring out where and how to make my php files to?!

 

Currently I have the following Config file...

<?php
// Build Date: 2011-12-17 1:15pm

// Website Environment
define('ENVIRONMENT', 'development');
//define('ENVIRONMENT', 'production');


// Web Root (aka Document Root) (**Physical Location)
define('WEB_ROOT', ENVIRONMENT === 'development'
				? '/Users/user1/Documents/DEV/++htdocs/05_Debbie/'
				: '/var/www/vhosts/MySite.com/httpdocs/');


// Base URL (**Virtual Location)
define('BASE_URL', ENVIRONMENT === 'development'
				? 'http://local.debbie/'
				: 'http://www.MySite.com/');
?>

 

What am I supposed to use for WEB_ROOT and BASE_URL on this free hosting site?!

 

 

Currently, to view my test website you go to...

http://www.doubledee.byethost2.com/

 

I suppose that could be "BASE_URL", but for where things are physically stored so I can redefine "WEB_ROOT" I have no clue...  :shrug:

 

Help!

 

Thanks,

 

 

Debbie

 

Link to comment
https://forums.phpfreaks.com/topic/255462-need-help-finding-paths-on-free-host/
Share on other sites

See $_SERVER['DOCUMENT_ROOT'] which will return the root of your virtualhost. Your BASE_URL will be the base url you use to access the site. You should know this yourself.

 

So are you saying I should change my Config File to this...

// Web Root (aka Document Root) (**Physical Location)

define('WEB_ROOT', ENVIRONMENT === 'development'

? '/Users/user1/Documents/DEV/++htdocs/05_Debbie/'

: '/var/www/vhosts/MySite.com/httpdocs/');

: $_SERVER['DOCUMENT_ROOT']);

 

 

Debbie

 

Yes. Or at least have a look at what $_SERVER['DOCUMENT_ROOT'] holds.

 

I tried that and compared it to phpinfo() and they both yield the same path, so it looks like that was an easy fix?!

 

Thanks!!!!!!

 

 

Debbie

 

P.S.  I will post a URL to my Test Site tomorrow in response to your response (http://www.phpfreaks.com/forums/index.php?topic=352090.new;topicseen#new) to my "Difficulty of Creating Online Forum" thread!  :)

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.