Hi i get a couple of errors wth this code. Could anyone help me out with what they could be?
function getData() {
$handle = @fopen('somefile.txt', "w");
$content = '';
if($handle) {
while (!feof($handle)){
$content .= fread($handle, 8192)
}
fclose($handle);
}
return $content;
}
i think maybe the 2nd line should be:
$handle = @fopen(w,"somefile.txt");
or maybe that the 3rd line should be:
$content = "";
and that maybe there should be a semi-colon in the while loop?
Thanks. your help will be much appreciated!