Jump to content

[SOLVED] Need Help Fast Link issues


Danny620

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/164866-solved-need-help-fast-link-issues/
Share on other sites

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');

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

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.