Unexpected character in input: '\' (ASCII=92) state=1

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • swethak
    New Member
    • May 2008
    • 118

    #1

    Unexpected character in input: '\' (ASCII=92) state=1

    hi,

    i create the one file.At time of creation i insert below contents into the file
    [code=php]
    <?php
    include("ClassN ame.class");
    $myclass = &new ClassName;
    echo $myclass->myfunction1( );
    ?>[/code]

    After file created and insert the text into the file as like this
    [code=php]
    <?php
    include(\"Class Name.class\");
    $myclass = &new ClassName;
    echo $myclass->myfunction1( );
    ?>[/code]

    In that additionally add \ .Due to this i got the error as

    errors :
    Unexpected character in input: '\' (ASCII=91) state=1 in F:\Facebook\fur niture11\Data Mining1\public_ html\admin\newf ile.php on line 1

    Parse error: parse error, unexpected $end in F:\Facebook\fur niture11\Data Mining1\public_ html\admin\newf ile.php on line 1

    plz tell that how i avoid the errors
  • pbmods
    Recognized Expert Expert
    • Apr 2007
    • 5821

    #2
    Heya, Swethak.

    Remove the '\' characters from your include() statement.

    Comment

    • swethak
      New Member
      • May 2008
      • 118

      #3
      Originally posted by pbmods
      Heya, Swethak.

      Remove the '\' characters from your include() statement.
      i am not include that \ symbol.By default it save like that as mention above

      Comment

      • Atli
        Recognized Expert Expert
        • Nov 2006
        • 5062

        #4
        Originally posted by swethak
        i am not include that \ symbol.By default it save like that as mention above
        How are you creating the file? Why are those extra slashes being added?

        The problem, like pbmods says, is the extra slashes. Removing them will fix the problem. We can't help you determine how to do that if we don't know why they are being added.

        Comment

        Working...