Welcome Guest, Not a member yet? Register   Sign In
View is not loaded
#1

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
Reply
#2

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

(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.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB