[RESOLVED] php 5 error

liunx

Guest
Ok so my friend upgraded his server to php5 from 4. There is a few errors but this is the biggest.

If i go to a blank page and do.

<? $name='Mark';?>
<? echo $name; ?>

it dont work. Heres the php settings. <!-- m --><a class="postlink" href="http://www.pakcafan.org/phpinfo.php">http://www.pakcafan.org/phpinfo.php</a><!-- m -->


Anything on there that isnt set right that would make this simple echo statement not work ?From the phpinfo() output:

short_open_tag | Off | Off

This is why it's a good idea to always use "<?php" instead of "<?" and "<?php echo" instead of "<?=", since (a) it is more portable (the long tags always work), and (b) the short form has been deprecated for a reason: it conflicts with <?xml tags.Thanks worked
 
Back
Top