On 2/01/2008, at 6:28 PM, Antti Harri wrote:
On Wed, 2 Jan 2008, STeve Andre' wrote:
However I can't use imbedded php like
<? require_once('header.php'); ?>
Use <?php ?>
so I'm missing something and I haven't found what it is after a lot
of looking around. Can someone point me in the correct direction?
--
Antti Harri
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.)