Refresh page in time interval

3

I need to set the goal:

meta http-equiv="refresh" content="30"

In the meantime I'm using CodeIgniter and I can not do it. I tried:

$this->output->set_header('refresh:30;url=minhapagina.php');

Any suggestions?

    
asked by anonymous 09.04.2014 / 18:23

1 answer

2

Put it right in your View you can even configure whether or not you need it! So

public function index(){
        $data['stsRefresh'] = true;
        $this->load->view('Arquivos/index', $data);
}

And in your View

<html>
<head>
<title>Upload Form</title>
</head>
<body>
<?php
    if (isset($stsRefresh)){
        echo '<meta http-equiv="refresh" content="300">';
    }
?>
<form action="/arquivos/do_upload" method="post" enctype="multipart/form-data">
<input type="file" name="userfile" size="20" />

<br /><br />

<input type="submit" value="upload" />

</form>

</body>
</html>

Reference

09.04.2014 / 18:36