Page 1 of 1

php not working correctly

PostPosted: 13. October 2009 17:28
by donaldfoo
Hi all,
Something very strange in my new installed xampp.
I found that all my php nor working anymore without "<?php"
I used to use "<?" instead of "<?php" my html code.
it will only show blank without excute the code.

i.e.
Working one
Code: Select all
<?php
    phpinfo();
?>


Not working
Code: Select all
<?
    phpinfo();
?>


Anyone has any idea?

Regards,
Donald

Re: php not working correctly

PostPosted: 13. October 2009 17:31
by Wiedmann
Anyone has any idea?

The PHP manual knows everything about basic PHP behavior ;-)
(and which PHP ini setting is involved)

I found that all my php nor working anymore without "<?php"
I used to use "<?" instead of "<?php" my html code.

http://de.php.net/manual/en/language.basic-syntax.phpmode.php

Re: php not working correctly

PostPosted: 13. October 2009 17:33
by denebgarza
PHP's newest version 5.3.0 (which comes with XAMPP's newest release 1.7.2) removed the <? tag. It's now always <?php, I believe it was due to some complications when working with XML.

Re: php not working correctly

PostPosted: 13. October 2009 17:50
by donaldfoo
Dear Wiedmann and denebgarza,
Thanks for your quick respone and the useful information.
It works now.

Regards,
Donald