Files
EdgeAPI/internal/accesslogs/tests/command_storage.php

24 lines
379 B
PHP
Raw Normal View History

2021-07-29 16:50:59 +08:00
<?php
// test command storage
// open access log file
$fp = fopen("/tmp/goedge-command-storage.log", "a+");
// read access logs from stdin
$stdin = fopen("php://stdin", "r");
while(true) {
if (feof($stdin)) {
break;
}
$line = fgets($stdin);
// write to access log file
fwrite($fp, $line);
}
// close file pointers
fclose($fp);
fclose($stdin);
?>