Shadowing Posted May 1, 2012 Share Posted May 1, 2012 Hey guys Anyone know the correct syntax to put a constant inside a header? this is driving me crazy with RPATH being my constant header("Location: ".RPATH."admin/monitor.php"); Quote Link to comment https://forums.phpfreaks.com/topic/261918-using-constants-inside-a-header/ Share on other sites More sharing options...
PFMaBiSmAd Posted May 1, 2012 Share Posted May 1, 2012 That would be the correct syntax. What exact problem are you trying to solve? Quote Link to comment https://forums.phpfreaks.com/topic/261918-using-constants-inside-a-header/#findComment-1342110 Share on other sites More sharing options...
Shadowing Posted May 1, 2012 Author Share Posted May 1, 2012 Thanks for the responce PFMaBiSmAd Its a wierd problem, it gives me a white page when i do that, and then once I'm on the white page if I hit refresh it works. so it produces the correct link but for some reason it white pages Quote Link to comment https://forums.phpfreaks.com/topic/261918-using-constants-inside-a-header/#findComment-1342113 Share on other sites More sharing options...
Shadowing Posted May 1, 2012 Author Share Posted May 1, 2012 I'm using PHP 5.2 so idk maybe my php version? Quote Link to comment https://forums.phpfreaks.com/topic/261918-using-constants-inside-a-header/#findComment-1342115 Share on other sites More sharing options...
Shadowing Posted May 1, 2012 Author Share Posted May 1, 2012 wait i miss read the link lol. the header isnt working at all. the constant looks like this define('RPATH', 'C:/Software/XAMPP/xampp/htdocs/system_lords/'); Quote Link to comment https://forums.phpfreaks.com/topic/261918-using-constants-inside-a-header/#findComment-1342116 Share on other sites More sharing options...
xyph Posted May 1, 2012 Share Posted May 1, 2012 Location must be a URI, not a local system path Quote Link to comment https://forums.phpfreaks.com/topic/261918-using-constants-inside-a-header/#findComment-1342123 Share on other sites More sharing options...
Shadowing Posted May 2, 2012 Author Share Posted May 2, 2012 thanks xyph that fixed my issue Quote Link to comment https://forums.phpfreaks.com/topic/261918-using-constants-inside-a-header/#findComment-1342386 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.