You are here: Re: heardoc problem « PHP Programming Language « IT news, forums, messages
Re: heardoc problem

Posted by Jerry Stuckle on 12/08/07 03:22

AnrDaemon wrote:
> Greetings, Richard.
> In reply to Your message dated Thursday, December 6, 2007, 21:33:37,
>
>
>> "JP" <jpsebasti@gmail.com> wrote in message
>> news:f9c03885-dfe5-4632-a260-9203a07176cf@w34g2000hsg.googlegroups.com...
>>> Anyone see a problem with this code?
>>>
>>> <?php
>>> $login_error=<<<EOL
>>> <html>
>>> <head><title>Database Login Error</title></head>
>>> <body>
>>> <b>Database Login Error<br><br></b>
>>> </body>
>>> </html>
>>> EOL;
>>> echo "$login_error";
>>> ?>
>>>
>>> When I attempt to run it at the command line
>>> C:\ php t.php
>>>
>>> I get the following error:
>>> PHP Parse error: syntax error, unexpected $end in C:\Sebastian\pbuuc
>>> \auction\t.php on line 12
>
>> Which of the lines is line 12?
>
> Error said that parser found an unexpected end of file.
> Guess there is a problem in heredoc syntax. (haven't used it for ages)
>
>

There is no problem with heredoc syntax. I use it all the time.

Something in the post does not match what's in the actual file.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

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

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