private function WriteFile($file,$mode,$content){
$handle = fopen($file, $mode);
fwrite($handle, $content);
fclose($handle);
}
this is my code and giving me the error
fclose() expects parameter 1 to be resource, boolean given in and
fwrite() expects parameter 1 to be resource, boolean given in
directory