Welcome Guest, Not a member yet? Register   Sign In
Reminder about php short tags
#1

[eluser]ProImage Web[/eluser]
I saw it mentioned that using php short tags is not good practice, as some servers don't allow them. And for something that will be re-distributed, I'll have to agree. However, for those of us that are working on a site or software that won't be re-distributed, we can always rely on the fact that in our config file we can always set $config['rewrite_short_tags'] to TRUE

I'm just sayin' Smile
#2

[eluser]Irfan Cikoglu[/eluser]
Cool, so? o.o
#3

[eluser]ProImage Web[/eluser]
Who said we aren't rich? if time == money, then you wasted it by taking the time to post that Smile ..

<<<< coding is planning two steps ahead of the next thing that breaks. >>>>
#4

[eluser]Irfan Cikoglu[/eluser]
Smile I mean, in user guide its explained. But thanks..
#5

[eluser]skunkbad[/eluser]
If you enabled short tags there is a risk of a conflict when using xml files in your application, which I do. Xml files have a document declaration (if that's what you call it) that is wrapped in what looks like short tags. I have views that are xml templates. I can pass data to those views, and then send them with xml headers. If I enable short tags, php will output a fatal error.

Short tags are also a bad habit to get into using. I can't tell you how many scripts I have had to update to standard php tags because they don't work on my server with default configuration.

The beauty of php is that you can do things in many ways, but over time you will understand that short tags are bad, like smoking cigarettes, or like playing around with a prostitute.




Theme © iAndrew 2016 - Forum software by © MyBB