Welcome Guest, Not a member yet? Register   Sign In
Hello World controller example
#1

I was looking at the Hello World example in the documentation and see there is no ?> at the end. Why would that be?

http://www.codeigniter.com/user_guide/ge...ello-world
Reply
#2

That's very common to leave off the ending php closing tag. If there is any whitespace after the closing tags it can cause errors, so it's generally best just to leave it off. PHP doesn't require it, and there really isn't any benefit to having it. Most modern php code leaves it off, not just CI.

http://stackoverflow.com/questions/32193...ng-php-tag
Reply
#3

Interesting. I guess I will have to remove those closing tags now.
Reply
#4

It is becoming very common practice for the web-atisans to leave closing the PHp tags to avoid some errors. Why you have a probz regarding that, its good naa to code less.
Since, CI is for developers to code less/small footprint
Rolleyes
Reply
#5

(05-23-2015, 05:25 PM)CroNiX Wrote: That's very common to leave off the ending php closing tag. If there is any whitespace after the closing tags it can cause errors, so it's generally best just to leave it off. PHP doesn't require it, and there really isn't any benefit to having it. Most modern php code leaves it off, not just CI.

http://stackoverflow.com/questions/32193...ng-php-tag

Correct, Also its more secure
Reply




Theme © iAndrew 2016 - Forum software by © MyBB