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"); 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? 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 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? 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/'); 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 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 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
Archived
This topic is now archived and is closed to further replies.