سلام

مهندسین عزیز کد زیر چه مشکلی داره؟ ارور syntax میده
کد PHP:
<?php
if (strpos($_SERVER['HTTP_REFERER'], "localhost") == true) {
$filee=fopen("test.txt",a);
fputs($filee,"1");
fputs($filee,"\r\n");
fclose($filee);
}
$file=fopen("test.txt",r);
$i=0;
while(!
feof($file)){
fgets($file);
$i++ ;
}
fclose($file);
echo 
"ورودی گوگل"." "$i;
?>