Re: [PHP] <?=$var?> on OS X



On 27/11/06, Chris <dmagick@xxxxxxxxx> wrote:
Dotan Cohen wrote:
> On 27/11/06, Chris <dmagick@xxxxxxxxx> wrote:
>> Dotan Cohen wrote:
>> > On 27/11/06, Brian Dunning <brian@xxxxxxxxxxxxxxxx> wrote:
>> >> I've got a new OS X box and for some reason <?=$var?> doesn't work
>> >> like it does on all my other OS X boxes - anyone know a quick reason
>> >> why not?
>> >>
>> >
>> > Exactly for that reason I don't recommend that you use it. Just use
>> > <?php print $var; ?> as it's portable and doesn't add that much
>> > typing- certainly not enough to justify the headache.
>>
>> Good suggestion but it doesn't help if it's not his software that he
>> needs to get running ;)
>
> Actually, it does. He can global replace "<?=" with "<?php print" and
> be done with it. Then he could let the author of this non-portable
> software know that his 'shortcut' makes using the software difficult.
>
> Especially if it's not his own code (ie, code meant to be used by
> others) it should not depend upon short tags.

Well he could also change it with a htaccess :P

php_flag short_open_tags on


If it's for many files and he doesn't know perl (I don't either, but I
know that perl can search/replace many files with ease), then he could
override the php.ini settings in .htaccess. That, however, doesn't
solve the root problem: the use of short tags. If he needs the fix for
only one file, then open it in vi (or whatever gui app Macs use :) and
have at it.

Dotan Cohen
http://what-is-what.com/what_is/html_email.html
http://song-lirics.com/
.



Relevant Pages

  • Re: newbie question: yields no output
    ... My first first explanation was not a translation of my second post. ... My first post gave you a different reason not to ... use short tags whilst, since you were still arguing the point, I gave ... Therefore, there is no compelling reason to disable short tags on a server, because portable code will not contain anything that would be broken by enabling it. ...
    (comp.lang.php)
  • will you measure minus the interior, if Ali at first debates the medicine
    ... recommend them particularly. ... She'd rather going fairly than relax with Tim's unique interval. ... The evenings, tags, and scholars are all inc and explicit. ...
    (sci.crypt)
  • Re: .htaccess, blogger & purplecloud.net
    ... publishing there - can find no obvious reason for this - any ... The .htaccess file must be readable by ... Unless Apache has the suexec wrapper this means you'll ... with .htaccess redirects from studentnurse.me.uk to ...
    (uk.comp.sys.mac)
  • Re: [PHP] strip_tags
    ... If you are sanitizing _POST input for a database by escaping, ... The database won't care whether the content includes HTML tags. ... that sense, there isn't a reason. ...
    (php.general)
  • Re: Setting of <? and <?php
    ... for maximum compatibility you would do ... > anyway, which, of course, removes the reason to turn short tags off. ... > Besides short tags I also use the alternative control structure syntax (<? ... Of course, if you're running straight, hardcoded XML, then the XML file ...
    (comp.lang.php)