what is wrong with this <<< syntax ??

This is a discussion on what is wrong with this <<< syntax ?? within the PHP Language forums, part of the PHP Programming Forums category; Ok, pretty new to this php stuff, but good with perl/python etc. What is wrong with this php document ??? ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-25-2005
andrew
 
Posts: n/a
Default what is wrong with this <<< syntax ??

Ok, pretty new to this php stuff, but good with perl/python etc.

What is wrong with this php document ???

I get this error:

Parse error: syntax error, unexpected $end in
E:\xampp\workspace\test1\fragments.php on line 7

from this doc ...

===== start doc
<?
print <<<EOF
asdf
EOF;


print <<<EOFX
asdf
EOFX;
?>
===== end doc

Reply With Quote
  #2 (permalink)  
Old 03-25-2005
Andy Hassall
 
Posts: n/a
Default Re: what is wrong with this <<< syntax ??

On 25 Mar 2005 07:39:44 -0800, "andrew" <aktweb@msn.com> wrote:

>Ok, pretty new to this php stuff, but good with perl/python etc.
>
>What is wrong with this php document ???
>
>I get this error:
>
>Parse error: syntax error, unexpected $end in
>E:\xampp\workspace\test1\fragments.php on line 7
>
>from this doc ...
>
>===== start doc
><?
>print <<<EOF
>asdf
>EOF;
>
>
>print <<<EOFX
>asdf
>EOFX;
>?>
>===== end doc


Nothing's wrong with what you've posted, it works fine.

--
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Reply With Quote
  #3 (permalink)  
Old 03-25-2005
NC
 
Posts: n/a
Default Re: what is wrong with this <<< syntax ??

andrew wrote:
>
> What is wrong with this php document ???
>
> I get this error:
>
> Parse error: syntax error, unexpected $end in
> E:\xampp\workspace\test1\fragments.php on line 7
>
> from this doc ...
>
> ===== start doc
> <?
> print <<<EOF
> asdf
> EOF;
>
> print <<<EOFX
> asdf
> EOFX;
> ?>
> ===== end doc


Make sure EOF; and EOFX; are immediately followed by
line breaks (there should not be any blank spaces
after them).

Cheers,
NC

Reply With Quote
  #4 (permalink)  
Old 03-25-2005
Travis Font
 
Posts: n/a
Default Re: what is wrong with this <<< syntax ??

It's your hoster. They must have it turned off in php.ini. Tell use
errors/whats going on thats wrong..maybe can directly point it out ^_^

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 10:51 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0