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
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

 

Link to comment
Share on other sites

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!  :)

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.