CodeIgniter Forums
Problem with Additional Whitespace - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: Best Practices (https://forum.codeigniter.com/forum-12.html)
+--- Thread: Problem with Additional Whitespace (/thread-62921.html)



Problem with Additional Whitespace - acekyd - 09-08-2015

Hello,

I just upgraded from 2.2.0 to 3.0.0 and i noticed something in my pages... 

Before my views are called or even before an echo is done in a controller function, a whitespace is always present... if i echo directly in the controller before 
PHP Code:
Class Home extends CI_Controller 
The echo is done before the whitespace which makes believe it has something to do with the extending the CI_Controller... Here is an example of what i mean in attached pictures... any solutions?


RE: Problem with Additional Whitespace - includebeer - 09-12-2015

My guess is you have a white space after a closing php tag "?>". That's why you should not put the closing php tag in your class files. Only the opening tag is required.


RE: Problem with Additional Whitespace - acekyd - 12-21-2015

Thanks @includebeer... Would take note of that