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 Quote 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. Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.