Skip to content

Commit 816a7fa

Browse files
committed
add: debug助手功能;phar模式打包;fixes: API删除无用信息
1 parent b2df13e commit 816a7fa

File tree

7 files changed

+658
-40
lines changed

7 files changed

+658
-40
lines changed

autoload.php

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
/**
3+
* 提供给phar使用 路由
4+
* User: Siam
5+
* Date: 2021/7/8
6+
* Time: 17:15
7+
*/
8+
9+
define("START_MEM", memory_get_usage());
10+
require_once __DIR__."./vendor/autoload.php";
11+

builder.php

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
/**
3+
* 打包成phar使用
4+
* User: Siam
5+
* Date: 2021/7/8
6+
* Time: 17:15
7+
*/
8+
9+
//产生一个siam.phar文件
10+
$phar = new Phar('siam.phar', 0, 'siam.phar');
11+
// 添加src里面的所有文件到siam.phar归档文件
12+
$phar->buildFromDirectory(dirname(__FILE__));
13+
//设置执行时的入口文件,第一个用于命令行,第二个用于浏览器访问,这里都设置为index.php
14+
$phar->setDefaultStub('autoload.php', 'autoload.php');

composer.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
"ext-curl": "*",
1818
"ext-simplexml": "*",
1919
"ext-libxml": "*",
20-
"ext-xml": "*"
20+
"ext-xml": "*",
21+
"symfony/var-dumper": "5.3.3",
22+
"symfony/filesystem": "5.3.3"
2123
},
2224
"autoload": {
2325
"psr-4": {

0 commit comments

Comments
 (0)