实现基本的访问日志策略

This commit is contained in:
刘祥超
2021-07-29 16:50:59 +08:00
parent 3b2f6060b8
commit bda407fc3f
19 changed files with 1451 additions and 57 deletions

View File

@@ -0,0 +1,24 @@
<?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);
?>