/    Sign up×
Community /Pin to ProfileBookmark

Parse Error: Line 2

OK, i got a parse error on line 2 of this code:
I was wondering if any of you could see what might be wrong.

[code=php]
<?php
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

?>
[/code]

Thanks in advance!!

to post a comment
PHP

12 Comments(s)

Copy linkTweet thisAlerts:
@JonaSep 27.2004 — [font=trebuchet ms]Um, that's ASP not PHP. :rolleyes: [/font]
Copy linkTweet thisAlerts:
@drythirstauthorSep 27.2004 — oooh maybe thats the prob LOL
Copy linkTweet thisAlerts:
@drythirstauthorSep 27.2004 — Well I'm Still having problems w/ it.......


HELP
Copy linkTweet thisAlerts:
@HellspireSep 27.2004 — Think! If its ASP coding and your passing it through a PHP block... dont you think that you'll get a parse error............. :rolleyes:
Copy linkTweet thisAlerts:
@JonaSep 27.2004 — [font=trebuchet ms]Ask in the ASP forum; your script looks fine to me. Maybe you should try giving the new error message as well...[/font]
Copy linkTweet thisAlerts:
@drythirstauthorSep 27.2004 — the error message never changed

i dont think that as far as the browser got, it made a difference. if it gets an error on line two, it stops at line two. heck there could be a problem on line 4 and i wouldnt know it until i fixed line 2.
Copy linkTweet thisAlerts:
@MstrBobSep 27.2004 — Browsers don't read server side scripts, [I]servers[/I] interpret it. ?

If it's ASP, it should be used on an ASP page, on a server that uses ASP, with proper ASP syntax. And the question should then be asked in the ASP forum. If however, you have PHP code with which to seek our help, we can only do so if we see the [B]PHP[/B] source. ?
Copy linkTweet thisAlerts:
@drythirstauthorSep 30.2004 — well i meant server***** cuz ....well ya
Copy linkTweet thisAlerts:
@solavarSep 30.2004 — Remember, with PHP, you must terminate the statement with a semicolon.

That's the source of error!


*** edit ***


Asking PHP to parse ASP code is a new one on me.

?
Copy linkTweet thisAlerts:
@drythirstauthorOct 01.2004 — terminate what statement???

like [i]where[/i] does the semicolon go?
Copy linkTweet thisAlerts:
@Paul_JrOct 01.2004 — [font=palatino linotype]This thread has no point. You are trying to write ASP code within PHP start and end tags &#8212; that isn&#8217;t going to work no matter which way you do it. Swap out the PHP start and end tags for ASP tags (<% and %>), then see if the code works. If it does not, ask in the ASP forum.[/font]
Copy linkTweet thisAlerts:
@JonaOct 01.2004 — [font=trebuchet ms]I agree with Paul. This thread is old and useless; I keep getting messages in my inbox saying someone has replied to it, and each time I see the replies are completely irrelevant and as useless as the original post. This thread should be locked. It isn't doing anyone any good.[/font]
×

Success!

Help @drythirst spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.24,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...