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

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -