- <?
- function getOnOff($inputHandle) {
- return fgets($inputHandle);
- }
- function maintenanceCheck ()
- {
- // open the onoff switch and have a look
- $handle = fopen("onoff.php", "r");
- $onoff = getOnOff($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 $result;
- }
- ?>