Re: A clue about php5, please?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: STeve Andre' <andres@...>, Antti Harri <iku@...>
Cc: misc <misc@...>
Date: Wednesday, January 2, 2008 - 3:42 am

On 2/01/2008, at 6:28 PM, Antti Harri wrote:

> On Wed, 2 Jan 2008, STeve Andre' wrote:

Longer explanation ...

This one has stung me a number of times - seems short tags are no
longer the
default in PHP 5 (something about playing better with XML.)

http://en.wikipedia.org/wiki/PHP

You can get short tags to work if you change your php.ini ...

See short_open_tag entry right near the top of this page:

http://nz.php.net/manual/en/ini.core.php

... but you are *really* better off getting in the habit of using
long tags - it is the way the (PHP) world is going.

Unfortunately this means that ...

<?=$var?>

no longer works - have to use ...

<?php echo $var?>

HTH - and you WILL forget this half-a-dozen times - leads to odd
errors, especially when you are pulling in include files.
(If you change a few tags in a file but not all of them, you'll
probably get unexpected $end errors - it hits the end of the
source file without finding matching open/close PHP tags.)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
A clue about php5, please?, STeve Andre', (Wed Jan 2, 1:20 am)
Re: A clue about php5, please?, Antti Harri, (Wed Jan 2, 1:28 am)
Re: A clue about php5, please?, Richard Toohey, (Wed Jan 2, 3:42 am)