Preamble: My application supports mod_rewrite, and I have an index.php page that loads vaious pages based on Request_URI and prints them as the contents of the page.
Problem: The File () or File_get_contents () function is excellent when loading my other application pages. But as soon as I try to use it to load the page with the session turned on , I have problems.
The main problem is that when I try to transfer an existing session id to a URL from a download page, for example
$url = "http://localhost/EmplDir/AdminMenu.php";
return implode('',file($url. "&" . session_name() . "=". session_id()));
My page never loads (or file () never loads content). I suspect that I am using curl functions here, but it has too many options. My advice which waving options to use to load pages about the current PHP session would be helpful.
PS The above seems to be true for both Windows and Linux.
AlexA source
share