what is wrong with this <<< syntax ??

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • andrew

    #1

    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\worksp ace\test1\fragm ents.php on line 7

    from this doc ...

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


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

  • Andy Hassall

    #2
    Re: what is wrong with this &lt;&lt;&lt; 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\works pace\test1\frag ments.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.andyhsoftwa re.co.uk/space> Space: disk usage analysis tool

    Comment

    • NC

      #3
      Re: what is wrong with this &lt;&lt;&lt; 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\worksp ace\test1\fragm ents.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

      Comment

      • Travis Font

        #4
        Re: what is wrong with this &lt;&lt;&lt; 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 ^_^

        Comment

        Working...