Changeset 7737
- Timestamp:
- Apr 13, 2010, 5:31:02 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/inc/LogHandler.class.php
r7727 r7737 88 88 echo '<!-- ' . $errorString . ' -->'; 89 89 } 90 if ($logno <= LOG_LEVEL_WRITE) { 91 // TODO: David: Write $errorString to file 90 if ($logno <= LOG_LEVEL_WRITE) { 91 $filename = 'logfile.txt'; 92 if (is_writable($filename)) { 93 94 //Check if the file can be opened 95 if (!$handle = fopen($filename, 'a')) { 96 echo "Cannot open file ($filename)"; 97 exit; 98 } 99 100 // Write $errorString to file. 101 if (fwrite($handle, $errorString) === FALSE) { 102 echo "Cannot write to file ($filename)"; 103 exit; 104 } 105 106 fclose($handle); 107 108 } else { 109 echo "The file $filename is not writable"; 110 } 92 111 } 112 93 113 if ($logno <= LOG_LEVEL_MAIL) { 94 // TODO: David: Mail $errorString to administrator114 mail('test@test.com', 'Nodemap error', $errorString); 95 115 } 96 116 }
Note:
See TracChangeset
for help on using the changeset viewer.