File Directory Php

    $access = "data.txt";               
    $visits = @file($access);           
    $current_visitors = $visits[0];     
    ++$current_visitors;                
    $fh = fopen($access, "w");          
    @fwrite($fp, $current_visitors);    
    fclose($fh);                        
?>