php - Transfer constants between url include files -


i have index.php

define ('server_root', '/foo'); define ('site_root', 'http://localhost'); include (site_root . server_root . '/config.php'); 

in config.php

echo site_root;  

returns null.


the reason if include http:// localhost , not localhost, constants not passed. can't set site_root localhost.. nothing happen

what's proper systematical solution issue?


Comments

Popular posts from this blog

matlab - How to equate a structure array to structure array -

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -