Tidak dapat membuka kesalahan file di PHP

$myFile = '/path/to/myFile.txt';
if (!file_exists($myFile)) {
  print 'File not found';
}
else if(!$fh = fopen($myFile, 'w')) {
  print 'Can\'t open file';
}
else {
  print 'Success open file';
}
Ankur