定制 pana1990/php-web-profiler 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pana1990/php-web-profiler

最新稳定版本:v0.3.2-alpha

Composer 安装命令:

composer require pana1990/php-web-profiler

包简介

Web profiler in the browser for php application

README 文档

README

Latest Stable Version Minimum PHP Version Build Status Software License

This package is under development. Please do not use in production yet 🙏

TODO

Getting Started

$ composer require --dev pana1990/php-web-profiler

Example usage with slim framework:

require __DIR__ . '/vendor/autoload.php';

$app = AppFactory::create();

// services
Db::setUp(); // setup schema
$pdoTraceable = new PdoTraceable('sqlite:' . __DIR__ . '/src/db/bbdd.db');
$log = (new Logger('log'))->pushHandler(new ErrorLogHandler());
$traceableLogger = new LoggerTraceable($log);

// setup for PhpWebProfiler
SlimPhpWebProfilerBuilder::fromApp($app)
    ->withPdo($pdoTraceable)
    ->withLogger($traceableLogger)
    ->build();

$app->get('/', function (Request $request, Response $response) use ($traceableLogger, $pdoTraceable) {
    $response->getBody()->write('Hello world!');

    $traceableLogger->error('This is an error message');

    $pdoTraceable->exec('INSERT INTO test (title) VALUES ("test");');
    $pdoTraceable->exec('SELECT * FROM test;');

    return $response;
});

$app->run();

See full example in here.

Note: with this setup you have two endpoints enabled (debug and debug/:token)

📷 Screenshots

Index page

Request panel

Request panel

Request panel

Log panel

Log panel

Database panel

Database panel

📅 ROADMAP

[ ] Add support for slim

⚖️ LICENSE

php-web-profiler is released under the MIT License. See the bundled LICENSE for details.

统计信息

  • 总下载量: 1.36k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 13
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 13
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-10-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固