Forum Moderators: coopster

Message Too Old, No Replies

Parse error: parse error, unexpected T_VARIABLE

         

RimA8210

6:06 pm on Sep 18, 2005 (gmt 0)

10+ Year Member


<?php
$log="log".date("Ymd")."ip.txt";
$fp=fopen($log,'a');
fputs($fp,$REMOTE_ADDR.":".$REMOTE_PORT." - ".$HTTP_USER_AGENT."-".$HTTP_REFERER."-".$REQUEST_METHOD."-".$QUERY_STRING."-".$HTTP_ACCEPT_LANGUAGE."-".$REQUEST_URI."\r\n");
fclose$fp)
?>

RimA8210

6:06 pm on Sep 18, 2005 (gmt 0)

10+ Year Member



sorry i forgot 2 menchain my problem, it says i have an error on line 5...any ideas?

maxi million

6:16 pm on Sep 18, 2005 (gmt 0)

10+ Year Member



fclose$fp)

this is the line...
fclose($fp);

u missed the opening ( and the ; at the end

RimA8210

6:26 pm on Sep 18, 2005 (gmt 0)

10+ Year Member



er i dun that but summin stil dnt work

jd01

7:31 pm on Sep 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is that the whole script and what does 'didn't work' (an error?) mean?

Justin

RimA8210

2:25 pm on Sep 19, 2005 (gmt 0)

10+ Year Member



er dno i fink the whole script is muffed

eprompt

12:11 pm on Sep 29, 2005 (gmt 0)




<?php
$log="log".date("Ymd")."ip.txt";
$fp=fopen($log,'a');

$HTTP_REFERER=@$_SERVER['HTTP_REFERER'];

fputs($fp,$REMOTE_ADDR.":".$REMOTE_PORT." - ".$HTTP_USER_AGENT."-".@$HTTP_REFERER."-".$REQUEST_METHOD."-".$QUERY_STRING."-".$HTTP_ACCEPT_LANGUAGE."-".$REQUEST_URI."\r\n");
fclose($fp);
?>

Try the adjusted code above. This may fix your problem.
;)
^_^