Welcome Guest, Not a member yet? Register   Sign In
Exiting the application - simple issue
#11

[eluser]Rick Jolly[/eluser]
[quote author="arume" date="1214008994"][quote author="Rick Jolly" date="1214005320"]It won't work because of CI's output buffering.[/quote]

I am using it and, as far as I know, it works. Can you say me where is the error?
Thanks.[/quote]
Sorry arume, I was referring to EEssam's code.
#12

[eluser]treehousetim[/eluser]
Just for reference,

Another way to accomplish this is to have a controller that you redirect to in this instance.
Then in that controller, display the view you want.
#13

[eluser]EEssam[/eluser]
Hi treehousetim,

Can you please clarify with some code.
#14

[eluser]treehousetim[/eluser]
Code:
if (1 == 1)
{
    redirect( '/Closed' );
}

then in controllers/Closed.php

Code:
class Closed extends Controller
{
    function index()
    {
        $this->load->view( ’closed’, $this->data );
    }
}
#15

[eluser]EEssam[/eluser]
That's cool! Thanks.
#16

[eluser]Seppo[/eluser]
This seems to be fixed, but I add my opinion
Code:
if (...)
{
    $this->load->view(’closed’, $this->data);
    return; //exit;
}
With return the controller script is halted, but the rest of CI still works as it should.

-Edit- now I see ontguy already posted it. Sorry then.




Theme © iAndrew 2016 - Forum software by © MyBB