note 54187 deleted from function.header by betz
| From: | betz@php.net | Date: | Mon, 27 Jun 2005 05:30:50 +0000 |
| Subject: | note 54187 deleted from function.header by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-90982@lists.php.net to get a copy of this message | ||
Note Submitter: jhyman at fas dot harvard dot edu
Reason: useless
----
If you're having trouble with header('Location: URL'); because the headers have
already been sent, then just use the following code:
function refresh($seconds, $url)
{
echo "<SCRIPT LANGUAGE=\"JAVASCRIPT\">
setTimeout(\"document.location='$url'\", ".($seconds *
1000).");
</SCRIPT>";
}
That should allow you to refresh a page by calling a php function.