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'; Link to comment https://forums.phpfreaks.com/topic/145728-need-a-similar-function-to-define/ 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/"; Link to comment https://forums.phpfreaks.com/topic/145728-need-a-similar-function-to-define/#findComment-765112 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 Link to comment https://forums.phpfreaks.com/topic/145728-need-a-similar-function-to-define/#findComment-765117 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. Link to comment https://forums.phpfreaks.com/topic/145728-need-a-similar-function-to-define/#findComment-765130 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 Link to comment https://forums.phpfreaks.com/topic/145728-need-a-similar-function-to-define/#findComment-765134 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.