| Conditions | 4 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | public static function init (int $log_size = 10) {
|
||
| 12 | self::$log_size = $log_size; |
||
| 13 | if (file_exists('BPT.log') && !(filesize('BPT.log') > self::$log_size * 1024 * 1024)) {
|
||
| 14 | $mode = 'a'; |
||
| 15 | $write = false; |
||
| 16 | } |
||
| 17 | else {
|
||
| 18 | $mode = 'w'; |
||
| 19 | $write = true; |
||
| 20 | } |
||
| 21 | |||
| 22 | self::$handler = fopen('BPT.log', $mode);
|
||
| 23 | |||
| 24 | if ($write) {
|
||
| 25 | fwrite(self::$handler,"♥♥♥♥♥♥♥♥♥♥♥♥♥♥ BPT Library ♥♥♥♥♥♥♥♥♥♥♥♥♥♥\nTnx for using our library\nSome information about us :\nAuthor : @Im_Miaad\nHelper : @A_LiReza_ME\nChannel : @BPT_CH\nOur Website : https://bptlib.ir\n\nIf you have any problem with our library\nContact to our supports\n♥♥♥♥♥♥♥♥♥♥♥♥♥♥ BPT Library ♥♥♥♥♥♥♥♥♥♥♥♥♥♥\nINFO : BPT Library LOG STARTED ...\nwarning : this file automatically deleted when its size reached log_size setting, do not delete it manually\n\n"); |
||
| 26 | } |
||
| 35 | } |