Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function archivo($content, $log = 'log') {
- $archivo = "/ruta/" . $log . '.txt';
- $fecha = date("Y/m/d h:i:s");
- $buffer = $fecha . " - " . $content . "\r\n";
- if (file_exists($archivo))
- $abrir = @fopen($archivo, "a");
- else {
- $abrir = @fopen($archivo, "w+");
- chmod($archivo, 0777);
- }
- @fwrite($abrir, $buffer);
- @fclose($abrir);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement