www.webdeveloper.com

View Poll Results: Is there a problem?

Voters
0. You may not vote on this poll
  • Yes

    0 0%
  • No

    0 0%
Results 1 to 3 of 3

Thread: Parse Error: Line two

  1. #1
    Join Date
    Sep 2004
    Posts
    80

    Parse Error: Line two

    I got a parse error on line two. I don't know what is wrong with the code. Maybe some of you ASPhreaks (lol no, jk ASP scripters) could help me. I will comment out a part with the line showing the prob.

    Code:
    <%
        dim filesys, filetxt
    #   THIS LINE^^^
        Const ForWriting = 2, ForAppending = 8
        Set filesys = CreateObject("Scripting.FileSystemObject")
        Set filetxt = filesys.OpenTextFile(Server.MapPath("/ip_log.txt"), ForAppending, True)
        filetxt.WriteLine("<p>")
        filetxt.WriteLine("IP=" & Request.ServerVariables("REMOTE_ADDR"))
        filetxt.WriteLine("<br>")
        filetxt.WriteLine("Date: " & Date() & " at " & Time() &".")
        filetxt.WriteLine("<br>")
        filetxt.WriteLine("HTTP_USER_AGENT=" & Request.ServerVariables("HTTP_USER_AGENT"))
        filetxt.WriteLine("<br>")
        filetxt.WriteLine("HTTP_REFERER=" & Request.ServerVariables("HTTP_REFERER"))
        filetxt.WriteLine("</p>")
        filetxt.Close
        Set filetxt = Nothing
        Set filesys = Nothing
    
    %>

  2. #2
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    5,298
    Your code looks fine. Unless your actually trying to the # as a comment initiator in VBScript. You need to use a single quote (').

    Can you post the actual error message?

    Regards.

  3. #3
    Join Date
    Sep 2004
    Posts
    80
    [EDIT]
    Well actually, the 3rd Line (# this line^^^) isn't actually in the script. So, the problem is on line two.
    The error message is:
    Code:
    Parse error: Parse error on line 2
    [/EDIT]
    edit---You can check it here: http://neutrai.freeserverhost.com/datforum/search.php
    Last edited by drythirst; 10-04-2004 at 08:46 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles