NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Access to additional directories


Joined: 11 Feb 2009
Posts: 8
Location: Cambridge, MA
Reply with quote
I have a project with a root directory of E:\inetpub\wwwroot\stuff. I have additional directories set to E:\inetpub\wwwroot\books. From a page in the stuff directory I'm trying to execute the following:

header("../books/login.php");
die();

This results in a blank page. Control does not transfer to the ../books/login.php page. What am I doing wrong?
View user's profileFind all posts by BillSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
hmm, your script is not producing any output, except header. So the page in the browser, if you open it in a browser, is expected to be blank.
If your intent to get web browser redirected to another page and send next request to login.php, you probably want to say that this login.php is new location and provide correct URI for that.
Header function is a generic header producer. For instance it can send 404 status, like header("HTTP/1.0 404 Not Found"); and can't guess for you that what you have there is new location. If location is what you need, say so: header("Location: ../books/login.php", true, 302);

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 11 Feb 2009
Posts: 8
Location: Cambridge, MA
Reply with quote
Thanks. That was the problem.
View user's profileFind all posts by BillSend private message
Access to additional directories
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic