You are here: Re: Basic question: function « All PHP « IT news, forums, messages
Re: Basic question: function

Posted by J.O. Aho on 06/26/07 18:12

Personne wrote:
> <?php
> function h()
> {
> echo 'hello';
> }
> ?>
> BIG
> <? h(); ?>
>
>
> Result with PHP4.3.10/Apache1.3.33 => BIGBIGhello
> Result with PHP5.2.6/Apache2.2.3 => BIG
>
> with PHP 5.2.6
> hello is not displayed
> why?
> how can I fix this?

There are two ways, configure php5 to use the short tags <?/?> or modify the
short tag to be a real tag <?php/?>.

I do suggest the later one, as you can get troubles when you need to use <?/?>
for something else like a xml header tag.

--

//Aho

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация