Fopen, is_file & cache

I am trying to read the content of an existing file:

$fileName = "/tmp/.netscan";
$fp = fopen($fileName, "rb");
if ( !$fp ) {
        throw new Exception('File open failed.');
$str = stream_get_contents($fp);

even though the file exists, I get the message:
“fopen(/tmp/.netscan): failed to open stream: No such file or directory”

$ ls -la /tmp/.netscan
-rwxrwxrwx 1 www-data www-data 33 Okt  9 15:59 /tmp/.netscan
Sponsor our Newsletter | Privacy Policy | Terms of Service