Reputation: 701
I am not sure why i get this error, i find everything right. Can anyone help me out?
if (str_replace('\', ' / ',$_SERVER['DOCUMENT_ROOT']) == SERVER_ROOT) { define('ABS_PATH', '');}
else { define('ABS_PATH', SERVER_ROOT); }
What am i missing in this?
Upvotes: 0
Views: 43
Reputation: 1274
if (str_replace('\\', ' / ',$_SERVER['DOCUMENT_ROOT']) == SERVER_ROOT){
define('ABS_PATH', '');
}
else {
define('ABS_PATH', SERVER_ROOT);
}
The \ is escaping the following quotation. Try changing that to '\\' as shown...
Upvotes: 1