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
Post a Comment