Safest method for require file in write $a = 'samplevalue'; and top of the which passowrds.php in write;
if($a != 'samplevalue'){ header('Location: http://www.example.com/'); }
passowrds.php :
if($r_key != 'a23b24c25samplekey' or empty($r_key)){ header('Location: http://www.example.com/'); exit(); } // r_key not equal a23b24c25samplekey or empty forward main page
bla.. bla.. bla..
sample.php :
$r_key = 'a23b24c25samplekey';
require_once(../../passowrds.php);
and that can be used for relative path;
$path = $_SERVER['DOCUMENT_ROOT'];
$path .= "/yourfolder/passowrwds.php";
require_once($path);
require_once(../../passowrds.php); safest than $path = $_SERVER['DOCUMENT_ROOT']; $path .= "/yourfolder/passowrwds.php"; require_once($path);