Jump to content
Larry Ullman's Book Forums

Recommended Posts

I inserted the following:

 

function curPageURL() {
$pageURL = 'http';
if (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if (isset($_SERVER["SERVER_PORT"]) && $_SERVER["SERVER_PORT"] != "80" && $_SERVER["SERVER_PORT"] != "443") {
 $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
 $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $pageURL;
}
session_start();
$_SESSION['last_page'] = curPageURL();

 

However, I get an error (the actual error message in email form is much longer):

 

An error occurred in script '########### /ventureFunctions.php' on line 97: A session had already been started - ignoring session_start() <br />Date/Time: 12-8-2011 18:51:57 <br />

 

How to fix this, please?

 

Thank you

 

zabberwan

Link to comment
Share on other sites

 Share

×
×
  • Create New...