Connecting Tech Pros Worldwide Help | Site Map

what is wrong with this <<< syntax ??

  #1  
Old July 17th, 2005, 01:17 PM
andrew
Guest
 
Posts: n/a
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

  #2  
Old July 17th, 2005, 01:17 PM
Andy Hassall
Guest
 
Posts: n/a

re: what is wrong with this <<< syntax ??


On 25 Mar 2005 07:39:44 -0800, "andrew" <aktweb@msn.com> wrote:
[color=blue]
>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[/color]

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
  #3  
Old July 17th, 2005, 01:17 PM
NC
Guest
 
Posts: n/a

re: what is wrong with this <<< syntax ??


andrew wrote:[color=blue]
>
> 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[/color]

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

Cheers,
NC

  #4  
Old July 17th, 2005, 01:17 PM
Travis Font
Guest
 
Posts: n/a

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 ^_^

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
<FAQENTRY> 4.41 correction =?iso-8859-2?Q?K=F8i=B9tof_=AEelechovski?= answers 6 March 4th, 2007 11:55 AM
template <typename T> struct polymorphic : public T ??? verec answers 1 July 23rd, 2005 06:45 AM
GMP: Cannot operate on vector<mpz_t> Richard Cavell answers 3 July 23rd, 2005 02:00 AM
syntax error in replace statement middletree answers 8 July 19th, 2005 09:13 AM