RE: [PHP] php redirection..
| From: | bruce | Date: | Thu, 14 Dec 2006 15:56:29 +0000 |
| Subject: | RE: [PHP] php redirection.. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-245826@lists.php.net to get a copy of this message | ||
bud...
if you try to use the 'sleep' function, you'll discover it doesn't
effectively wait... ie, it's not waiting a specified period of time, prior
to invoking the jscript location.href.
remember, sleep is server side, jscript is client side. i haven't thoroughly
tested this, but i imagine that this acts in a similar manner to the
'header' function as well...
-----Original Message-----
From: Budi Setiawan [mailto:misty.trees@gmail.com]
Sent: Wednesday, December 13, 2006 9:33 PM
To: bedouglas@earthlink.net
Cc: php-general@lists.php.net
Subject: Re: [PHP] php redirection..
> basically:
>
> cat.php
> -echo " test content<br>"
> -echo " more test content<br>"
>
> //redirect user
> echo"
> <script>
> location.href='foo.php';
> </script>
> ";
>
Hi , im a new too..
but you can try with this to delay your script running for some seconds :
echo " test content<br>"
echo " more test content<br>"
// you can add :
sleep(2);
// this will cause your script delayed for 2 seconds
//redirect user
echo"
<script>
location.href='foo.php';
</script>
";
// hhaha..
// im just trying to help...
//
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php