[PHP] basedir

diabolo

Community Advocate
Community Support
Messages
1,682
Reaction score
32
Points
48
does anyone know any pre defined variable that I can get the root address of my site, since I tried using $basedir = "http://www.mysitehere.com";
but php doesn't allow url file access

so does anyone know an alternative method?

http://www.spinthatyoyo.com - for the problem
 
Last edited:

leafypiggy

Manager of Pens and Office Supplies
Staff member
Messages
3,819
Reaction score
163
Points
63
what do you mean root adress? and upgrading your PHp version might help
 

Synkc

Active Member
Messages
1,765
Reaction score
0
Points
36
$_SERVER['DOCUMENT_ROOT'] - Super Global which contains the path to your root web directory (public_html).
 

diabolo

Community Advocate
Community Support
Messages
1,682
Reaction score
32
Points
48
thanks Synkc for the variable, now I am having trouble adding in the '/'
this is my current code, how do I go about adding the foward slash without it getting parsed into the code?
$basedir = $_SERVER['DOCUMENT_ROOT'];
 
Top