Created
November 7, 2011 10:10
-
-
Save sunny/1344603 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <? | |
| function log_info($s) { | |
| $fd = @fopen(LOG_FILE, 'a'); | |
| if (!$fd) | |
| throw new Exception(sprintf(l("Impossible d'ouvrir le fichier %s en écriture"), LOG_FILE)); | |
| $saved = @fwrite($fd, $s . "\n"); | |
| if (!$saved) | |
| throw new Exception(sprintf(l("Impossible d'écrire dans le fichier %s"), LOG_FILE)); | |
| fclose($fd); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment