R
R
Rishat Sultanov2017-05-01 21:08:03
Laravel
Rishat Sultanov, 2017-05-01 21:08:03

Redirect timing in php?

Good afternoon, ladies and gentlemen.
Yes: Is it possible to attach a timer to this function? Which one will trigger the redirect only after the time I specify? Thank you!
return redirect('/');

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Boris Korobkov, 2017-05-01
@rishatss

PHP usually runs asynchronously (serially). Theoretically, you can achieve asynchrony, but obviously not in your case.
1. Wrong option - sleep()
2. Partially correct - display html from 3. The most correct one - first think, what for the user to wait for a response from the server for so long. <meta http-equiv="refresh" content="10">

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question