viion Posted February 18, 2009 Share Posted February 18, 2009 I'm integrating phpbb3 to this website. At the moment I have to put in the root location of where it is installed to the session code on my index so it knows where to find the phpbb files, the thing is I have to type in phpbb/ then that means i gotta put phpbb/ in other files when pulling session information and using href links. How do I make it so i can just type like $phpbb_root and that be replaced with the value anywhere it see's it in an echo or just a value when being called, such as: $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '$phpbb_root'; Quote Link to comment Share on other sites More sharing options...
Cal Posted February 18, 2009 Share Posted February 18, 2009 Put this somewhere before you define $phpbb_root_path $phpbb_root = "phpbb/"; Quote Link to comment Share on other sites More sharing options...
viion Posted February 18, 2009 Author Share Posted February 18, 2009 For some reason it doesnt translate and just comes out as the variable not the value. Like this: Warning: include($phpbb_root/common.php) [function.include]: failed to open stream: No such file or directory in /home/content/s/i/i/siion/html/testsites/002/index.php on line 10 Quote Link to comment Share on other sites More sharing options...
gizmola Posted February 18, 2009 Share Posted February 18, 2009 Set up the path in a string first, then pass the string to the include statement. Quote Link to comment Share on other sites More sharing options...
viion Posted February 18, 2009 Author Share Posted February 18, 2009 Having it in the URL? I want to try avoid that XD Quote Link to comment 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.