Help
-
Search
-
Members
-
Calendar
Full Version:
Setting Document Root
Zymic Webmaster Forums
>
Zymic Free Web Hosting
>
Zymic Free Web Hosting - General Discussion & Help
smartalco
Feb 2 2008, 12:20 AM
is there a way to set the document root for individual sites? right now it appears to be set to /www/, so when using an include in the form of
include $_SERVER['DOCUMENT_ROOT'] . "filepath";
it doesn't just produce an error as it does now?
radman
Mar 5 2008, 11:17 AM
i have same problem here.
Does anyone have answer ?
My solution for this:
changing every $_SERVER['DOCUMENT_ROOT'] tags into pathname from $_SERVER['SCRIPT_FILENAME'] manually.
For now maybe this is a good solution for you smartalco, but i know it's not the best.
Alex
Mar 5 2008, 03:55 PM
You don't really want to be using the server document root, the best way is probably to define your own constant, something like:
CODE
<?php
define('MYSITE_ROOT','/path/to/my/files');
require_once MYSITE_ROOT.'file.php';
// or whatever
?>
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here
.
Invision Power Board © 2001-2012
Invision Power Services, Inc.