Finish API ?
This commit is contained in:
22
src/Library/Log.php
Normal file
22
src/Library/Log.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace RomhackPlazaFS\Library;
|
||||
use RomhackPlazaFS\RomhackPlazaFS;
|
||||
|
||||
defined( 'ROMHACKPLAZA_FS' ) || exit;
|
||||
|
||||
final class Log {
|
||||
|
||||
public function __construct( ...$info ){
|
||||
|
||||
$log = "[" . date( "Y-m-d h:i:sa" ) . "] " . $_SERVER["REMOTE_ADDR"] . " | ";
|
||||
|
||||
foreach( $info as $item )
|
||||
$log .= $item . " | ";
|
||||
|
||||
$log .= PHP_EOL;
|
||||
file_put_contents( $_ENV['ROMHACKPLAZAFS_FILE_LOG_PATH'], $log, FILE_APPEND | LOCK_EX );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user