예제 #1
0
파일: FileUtil.php 프로젝트: byjg/xmlnuke
 /**
  *@param string $file
  *@param string $content
  *@param bool $append Adiciona ao final ou nao.
  *@return void
  */
 public static function QuickFileWrite($file, $content, $append = false)
 {
     if ($file instanceof FilenameProcessor) {
         $filename = $file->FullQualifiedNameAndPath();
     } else {
         $filename = $file;
     }
     $mode = "w+";
     if ($append) {
         $mode = "a+";
     }
     $handle = FileUtil::OpenFile($filename, $mode);
     FileUtil::WriteFile($handle, $content);
     FileUtil::CloseFile($handle);
 }