代码拉取完成,页面将自动刷新
#composer 安装
location /logs/ {
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
break;
}
时光日志目录结构
|
|-- index.html
|-- README.md
|-- CHANGE.md
|-- lib
| |-- SgLogs.php
|-- logs
`-- example
|-- delete-all
|-- delete-curr.php
|-- disable-write.php
|-- func.php
|-- self-date.php
|-- self-dir.php
|-- self-html.php
|-- self-size.php
|-- self-theme.php
|-- self-txt.php
|-- simple.php
|-- verify.php
require('SgLogs.php');
$data = range(1,10);
SgLogs::write($data, 'data数据');
require('SgLogs.php');
define('SGLOGS_PATH', __DIR__ . '/logs/');
$data = range(1,10);
SgLogs::write($data, 'data数据');
require('SgLogs.php');
define('SGLOGS_PATH', __DIR__ . '/logs/');
define('SGLOGS_TYPE', 'txt');
$data = range(1,10);
SgLogs::write($data, 'data数据');
require('SgLogs.php');
$data = range(1, 10000);
define('SGLOGS_PATH', __DIR__ . '/logs/');
define('SGLOGS_MAX', 5);
$bool = SgLogs::write($data, 'data');
require('SgLogs.php');
$data = range(1,10);
SgLogs::write($data, 'data数据', true);
SgLogs::write(1, 'clear', 'all');
//将下面两行代码,放在你程序启动的文件里
include_once('SgLogs.php');
define('SGLOGS_PATH', __DIR__ . '/logs/');
//下面方法放在公用文件里,全局地方可以调用
function mylog($data, $flag, $flush = false)
{
SgLogs::write($data, $flag, $flush);
}
include_once('SgLogs.php');
define('SGLOGS_MODE', 0)
include_once('SgLogs.php');
SgLogs::write(1, 'clear-all', 'all');
define('SGLOGS_THEME', 'white');//底色为灰色
define('SGLOGS_THEME', 'default');//底色为黑色
sglogs('数据', 'flag')
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
1. 开源生态
2. 协作、人、软件
3. 评估模型