- Messages
- 5,508
- Reaction score
- 35
- Points
- 48
PHP:
$bwfile = filesize("./storage/".$foundfile[0]);
$bwfile = $bwfile / 1024;
$file = 'secure/stat.txt' or die('Could not open file!');
$fh = fopen($file, 'r') or die('Could not open file!');
$data = fread($fh, filesize($file)) or die('Could not read file!'); //here it stops
fclose($fh);
$result = $data+$bwfile;
$fh = fopen($file, 'w') or die('Could not open file!');
fwrite($fh, $result) or die('Could not write to file');
fclose($fh);
Why does not this work? It's windows vista, so chmod is no problems...
Last edited: