blueman378 Posted August 5, 2008 Share Posted August 5, 2008 hi guys i have something like this: index.php this includes: constants.php and register.php in that order in constants.php i have define("SHOP_NAME", "Gold Reaper"); and in register i have echo SHOP_NAME; however when this is run it simply outputs SHOP_NAME no errors, hwever when i move the define into register it works, (yes the constants file is being include properly) cheers Link to comment https://forums.phpfreaks.com/topic/118191-solved-constants-on-included-files/ Share on other sites More sharing options...
trq Posted August 5, 2008 Share Posted August 5, 2008 yes the constants file is being include properly Are you sure? Use require instead of include and see what happens. Make sure you have error reporting set to E_ALL and display errors on. Link to comment https://forums.phpfreaks.com/topic/118191-solved-constants-on-included-files/#findComment-608229 Share on other sites More sharing options...
blueman378 Posted August 5, 2008 Author Share Posted August 5, 2008 ..., i had a space and it was stopping it working lol Link to comment https://forums.phpfreaks.com/topic/118191-solved-constants-on-included-files/#findComment-608232 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.