User Guide Examples and Closing PHP tag

#1
[eluser]ray023[/eluser]
The Style Guide mentions that the closing php tag should not be used.

However, I've noticed the controller examples for things like the File Uploading Class and the Form Validation Class have the closing PHP tag.

I'm still learning CodeIgniter so I just want to verify that we should indeed use the closing comment version of the file rather than a closing PHP tag.

#2
[eluser]WanWizard[/eluser]
Use the closing comment, not the closing PHP tag.

The Form Validation and Upload class don't have a PHP closing tag in CI 1.7.2, which version are you using?

#3
[eluser]ray023[/eluser]
1.7.2.

Will close my controllers with the comment.

Thanks for the reply Smile

#4
[eluser]InsiteFX[/eluser]
A lot of people get this wrong!

As stated above use the colosing comments,
the reason you see some the old way is because
its old code that has not been updated etc.

InsiteFX


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.