- <?php
- // commonfns.php
- // 20100704
- function maintenanceCheck ()
- {
- // open the onoff switch and have a look
- $handle = fopen("onoff.php", "r");
- $onoff = fgets($handle);
- if (!feof($handle)) {
- echo "<P>Error: unexpected fgets() fail\n";
- }
- fclose($handle);
- echo "<P>after fclose common fns onoff says $onoff";
- $result = $onoff;
- return;
- }
- ?>