Reply to Re: embedded HTML in php code with 5.1.1

Your name:

Reply:


Posted by NC on 01/12/06 03:51

Bob Marley wrote:
> would anyone please tell me why this code works in 4.X, 5.0.X
> and not in 5.1?
>
> <?php
> function myfunction(){
>
> *** php code ***
> ?>
> <a href="bla.bla">bla</a>
> <?
> *** php code ***
>
> }
>
> ?>
>
> when i run it under 5.1 i get the error "Parse error: syntax error,
> unexpected $end in" on the last line of the file. i drop the embedded
> html and it works fine.

Most likely, it has nothing to do with PHP version, but rather with
your use of "<?" opening tag. Change it to "<?php" and see if it
solves the problem. If it does, it means your short_open_tag directive
is set to 0 and you must either change all "<?" tags to "<?php" tags or
set short_open_tag to 1.

Cheers,
NC

[Back to original 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

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