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

Untitled

By: a guest on Jun 26th, 2012  |  syntax: None  |  size: 0.37 KB  |  hits: 8  |  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. <?php
  2.  
  3. // commonfns.php
  4. // 20100704
  5.  
  6. function maintenanceCheck ()
  7. {
  8.  
  9. // open the onoff switch and have a look
  10.  
  11. $handle = fopen("onoff.php", "r");
  12. $onoff = fgets($handle);
  13.  
  14. if (!feof($handle)) {
  15.     echo "<P>Error: unexpected fgets() fail\n";
  16. }
  17.  
  18. fclose($handle);
  19. echo "<P>after fclose common fns onoff says $onoff";
  20.  
  21. $result = $onoff;
  22.  
  23. return;
  24.  
  25. }
  26.  
  27. ?>