I
I
Igorrebega2014-10-21 00:04:15
Yii
Igorrebega, 2014-10-21 00:04:15

How to make redirect with delay for yii2?

I can't make redirect with delay in yii2.

\Yii::$app->view->registerMetaTag("10;url={$urlTo}", null, 'refresh');

I read something like this, but it doesn't work.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Osher, 2014-10-21
@miraage

Try like this:

$meta = [
    'http-equiv' => 'Refresh',
    'content' => '10; url=' . $urlTo,
];
\Yii::$app->view->registerMetaTag($meta);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question