Danny620 Posted September 16, 2009 Share Posted September 16, 2009 as you can see the file i access http://localhost/index/sign.php sign.php is stored in the folder index but it needs to require a file thats stored out of index folder and in settings how do i do this i have this so far but it dont work require_once ('./settings/mysqli_connect.php'); Quote Link to comment https://forums.phpfreaks.com/topic/174505-file-roots/ Share on other sites More sharing options...
MadTechie Posted September 16, 2009 Share Posted September 16, 2009 require_once (dirname(__FILE__).'/../settings/mysqli_connect.php'); dirname(__FILE__) = is the path of the script that's running Quote Link to comment https://forums.phpfreaks.com/topic/174505-file-roots/#findComment-919713 Share on other sites More sharing options...
Danny620 Posted September 16, 2009 Author Share Posted September 16, 2009 sorry i dont get you Quote Link to comment https://forums.phpfreaks.com/topic/174505-file-roots/#findComment-919718 Share on other sites More sharing options...
MadTechie Posted September 16, 2009 Share Posted September 16, 2009 did you try that code ? Quote Link to comment https://forums.phpfreaks.com/topic/174505-file-roots/#findComment-919731 Share on other sites More sharing options...
Danny620 Posted September 17, 2009 Author Share Posted September 17, 2009 yes i did it worked but can you explain what it does to me thank you Quote Link to comment https://forums.phpfreaks.com/topic/174505-file-roots/#findComment-920124 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.