 <p>Avoid <code>exit;</code> / <code>function exit;</code> or <code>die;</code> will terminate execution, its better practice in only debugging your code.</p> <p>Try like below.</p> <pre><code>public function index(){ if($xx) return TRUE; } </code></pre>