d22552000 Posted September 22, 2007 Share Posted September 22, 2007 1 <?PHP 2 3 $HOST1 = $_SERVER['HTTP_HOST']; 4 $HOST2 = $_SERVER['REMOTE_HOST']; 5 $HOST3 = $_SERVER['REMOTE_ADDR']; 6 $REFE1 = $_SERVER['HTTP_REFERER']; 7 $AGEN1 = $_SERVER['HTTP_USER_AGENT']; 8 9 $WRITE = gmdate('[j:i:s]').' User: "'.$HOST1.$HOST2.$HOST3; 10 $WRITE.= '" From: "'.$REFE1.'" With: "'.$AGEN1."\"\t\r\n"; 11 file_put_contents('uploads/~view.log,$WRITE,FILE_APPEND|LOCK_EX); 12 13 if (!empty($_GET['id'])) { Error on line 13 (UNEXPECTED T_STRING) I know its something about my $WRITE.= statement, but I cant figure out what. (BTW the square characters (represents tab) in the source, is just this sites bb messing with my code.) Quote Link to comment https://forums.phpfreaks.com/topic/70248-solved-simple-syntax-error-help-plox/ Share on other sites More sharing options...
d22552000 Posted September 22, 2007 Author Share Posted September 22, 2007 I am a freakin idiot, self-solved I forgot to close the single quote when declaring VAR $file in the function file_put_contents. Quote Link to comment https://forums.phpfreaks.com/topic/70248-solved-simple-syntax-error-help-plox/#findComment-352820 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.