$$ zoe_daemon
you need a "linker" file to open a personal file from the parent page via AJAX.
/*this is simple "linker" file to open private file in folder named "private" from parent page via AJAX.*/ //begin linker.php <?php $link = $_GET["link"]; include "../private/$link.php"; ?> //end linker.php
and then the file in the "private" folder should check if the string "private" is contained in the request URI; this is not valid for a user who wants to use a private file directly. for axample, "login.php" inside a folder named "private" cannot be obtained directly if you put this code before entering the operating code that you want to put
//begin login.php $count = 0; $test = str_replace("name_of_directory_cannot_directly","dummy_string",$_SERVER['REQUEST_URI'], $count ); //or if ($count > 0) { die "Ooouuuppppsss, you cannot access this file directly"); } /* //your code here.... */ //end login.php
source share