Don't like ads? PRO users don't see any ads ;-)

jfile_Open - versão de testes...

By: whiplk on Mar 15th, 2012  |  syntax: PHP  |  size: 0.51 KB  |  hits: 66  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. //Função pra testes, PHP files
  2.  
  3. <?php
  4. function jfile_Open($file)
  5. {
  6.     if(!$file || !file_exists($file))
  7.         return false;
  8.  
  9.     $jj = fopen($file, "w");
  10.     fclose($jj);
  11.     return true;
  12. }
  13. //Edit
  14. function jfile_Exist($file)
  15. {
  16.         return file_Exist($file);
  17. }
  18.  
  19. function jfile_Delete($file)
  20. {
  21.         if(!jfile_Exist($file))
  22.                 return false;
  23.  
  24.         return unlink($file);
  25. }
  26.  
  27. function jfile_Open($file)
  28. {
  29.         if(jfile_Exist($file))
  30.                 return false;
  31.  
  32.         $newFile = fopen($file, "w");
  33.         return fclose($newFile);
  34. }
  35. ?>