doubledee Posted January 21, 2012 Share Posted January 21, 2012 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... Help! Thanks, Debbie Link to comment https://forums.phpfreaks.com/topic/255462-need-help-finding-paths-on-free-host/ Share on other sites More sharing options...
trq Posted January 21, 2012 Share Posted January 21, 2012 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. Link to comment https://forums.phpfreaks.com/topic/255462-need-help-finding-paths-on-free-host/#findComment-1309752 Share on other sites More sharing options...
doubledee Posted January 21, 2012 Author Share Posted January 21, 2012 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 https://forums.phpfreaks.com/topic/255462-need-help-finding-paths-on-free-host/#findComment-1309754 Share on other sites More sharing options...
trq Posted January 21, 2012 Share Posted January 21, 2012 Yes. Or at least have a look at what $_SERVER['DOCUMENT_ROOT'] holds. Link to comment https://forums.phpfreaks.com/topic/255462-need-help-finding-paths-on-free-host/#findComment-1309757 Share on other sites More sharing options...
doubledee Posted January 21, 2012 Author Share Posted January 21, 2012 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 https://forums.phpfreaks.com/topic/255462-need-help-finding-paths-on-free-host/#findComment-1309758 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.