gayanhewa/log-view

查看日志文件

1.0 2015-01-09 16:49 UTC

This package is auto-updated.

Last update: 2024-09-19 22:19:51 UTC


README

Build Status Total Downloads

LogView

一个简单的PHP库,允许您加载日志文件进行查看。

用法

        // Path to log files
        $path = __DIR__ . "/logs/";
        
        //Initialize the class
        $log = new Magelk\LogView();
        
        // Set Path
        $log->setPath($path);
        
        // Get file contents
        // $filename can be sent as a Request parameter 
        $contents = $log->getContent($filename);

如何使用示例

克隆存储库

    git clone https://github.com/gayanhewa/LogView.git

导航到doc目录

    cd LogView/doc 

运行PHP服务器

    php -S localhost:8080

将您的浏览器指向https://:8080并测试代码。您可以在doc/logs文件夹中添加更多文件进行测试。