CodeIgniter Forums
View is not loaded - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Model-View-Controller (https://forum.codeigniter.com/forumdisplay.php?fid=10)
+--- Thread: View is not loaded (/showthread.php?tid=62177)



View is not loaded - leonardo - 06-16-2015

Hello everyone

I've a project code using CI 3.0.0.

The app works great in my development environment but when I deployed the app in server I saw a weird behaviour. Check it out:

PHP Code:
class Welcome extends CI_Controller {
    function 
index()
    {
        
$this->load->view('welcome/index');
    }


The previous controller should rendered the file views/welcome/index.php, right? But it doesn't!
I replaced the view method to:

PHP Code:
$output $this->load->view('welcome/index', array(), true);
echo 
$output

...and it works fine!
Could someone help me in this?

I am using PHP 5.5.26 in server. My development environment runs PHP 5.5.20
I read the system/core/Loader.php to try finding something. It is likeĀ ob_start(), line 903 doesn't work when the view method is called with only 1 parameter.

Thanks


RE: View is not loaded - CroNiX - 06-16-2015

try renaming the view file to something other than "index.php". Just a hunch...


RE: View is not loaded - leonardo - 06-18-2015

(06-16-2015, 12:46 PM)CroNiX Wrote: try renaming the view file to something other than "index.php". Just a hunch...

Actually my problem was a hook calling a wrong file.

My apologies.