Danny620 Posted July 5, 2009 Share Posted July 5, 2009 i have a file that requires another file but the problem is that the file that requires another file is in a lower director e.g D:\STG\security_zone\login.php and it needs to require a file in a upper directory called e.g D:\STG\settings\config.inc how would i get the log-in to require that file this is what i got so far "require_once ('settings/config.inc.php'); " this is in the log-in file. Quote Link to comment https://forums.phpfreaks.com/topic/164866-solved-need-help-fast-link-issues/ Share on other sites More sharing options...
wildteen88 Posted July 5, 2009 Share Posted July 5, 2009 I'm asumming D:\STG\ is your sites document root folder? In which you can use require_once ($_SERVER['DOCUMENT_ROOT'].'/settings/config.inc.php'); Or you can use ../ to go up a level in the directory tree require_once ('../settings/config.inc.php'); Quote Link to comment https://forums.phpfreaks.com/topic/164866-solved-need-help-fast-link-issues/#findComment-869371 Share on other sites More sharing options...
Danny620 Posted July 5, 2009 Author Share Posted July 5, 2009 thanks alot i will try that but i have another problem An error occurred in script 'C:\xampp\htdocs\login.php' on line 6: include(includes/header.html) [function.include]: failed to open stream: Permission denied Quote Link to comment https://forums.phpfreaks.com/topic/164866-solved-need-help-fast-link-issues/#findComment-869376 Share on other sites More sharing options...
linuxdream Posted July 5, 2009 Share Posted July 5, 2009 Most likely the file (or that file's parent directory) you are trying to include is not readable by the web server. Be sure your web server have access to read the directory and file (not sure how to do that on a Win. box). Quote Link to comment https://forums.phpfreaks.com/topic/164866-solved-need-help-fast-link-issues/#findComment-869378 Share on other sites More sharing options...
Danny620 Posted July 5, 2009 Author Share Posted July 5, 2009 I'm asumming D:\STG\ is your sites document root folder? In which you can use require_once ($_SERVER['DOCUMENT_ROOT'].'/settings/config.inc.php'); Or you can use ../ to go up a level in the directory tree require_once ('../settings/config.inc.php'); thanks that work but i have a problem with the file called header.html i get this An error occurred in script 'C:\xampp\htdocs\security_zone\login.php' on line 6: include(../includes/header.html) [function.include]: failed to open stream: Permission denied Quote Link to comment https://forums.phpfreaks.com/topic/164866-solved-need-help-fast-link-issues/#findComment-869402 Share on other sites More sharing options...
Danny620 Posted July 5, 2009 Author Share Posted July 5, 2009 lol its fix what it was is i am using windows 7 and it set some sort of securty on includes folder it turned it green so what i did was create a new folder and create new files and bam it workkeddddd! Quote Link to comment https://forums.phpfreaks.com/topic/164866-solved-need-help-fast-link-issues/#findComment-869434 Share on other sites More sharing options...
corbin Posted July 5, 2009 Share Posted July 5, 2009 Green is the Bitlocker encryption feature if I remember correctly. There's no way that was accidentally turned on lol... And PHP should have still been able to get into it. What ever works though. Quote Link to comment https://forums.phpfreaks.com/topic/164866-solved-need-help-fast-link-issues/#findComment-869443 Share on other sites More sharing options...
Danny620 Posted July 6, 2009 Author Share Posted July 6, 2009 Green is the Bitlocker encryption feature if I remember correctly. There's no way that was accidentally turned on lol... And PHP should have still been able to get into it. What ever works though. lol do u know how to turn it off Quote Link to comment https://forums.phpfreaks.com/topic/164866-solved-need-help-fast-link-issues/#findComment-869755 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.