mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-17 20:34:51 +08:00
Adjust new README
This commit is contained in:
parent
970a74896a
commit
9a5b02692d
10
README-zh.md
10
README-zh.md
@ -161,7 +161,9 @@ chmod +x bin/spc
|
||||
|
||||
同时,你也可以使用参数 `--no-strip` 来关闭裁剪,关闭裁剪后可以使用 gdb 等工具调试,但这样会让静态二进制体积变大。
|
||||
|
||||
### 使用 php-cli
|
||||
## 不同 SAPI 的使用
|
||||
|
||||
### 使用 cli
|
||||
|
||||
> php-cli 是一个静态的二进制文件,类似 Go、Rust 语言编译后的单个可移植的二进制文件。
|
||||
|
||||
@ -176,7 +178,7 @@ cd buildroot/bin/
|
||||
./php your_project.phar # 运行打包为 phar 单文件的项目
|
||||
```
|
||||
|
||||
### 使用 micro.sfx
|
||||
### 使用 micro
|
||||
|
||||
> phpmicro 是一个提供自执行二进制 PHP 的项目,本项目依赖 phpmicro 进行编译自执行二进制。详见 [dixyes/phpmicro](https://github.com/dixyes/phpmicro)。
|
||||
|
||||
@ -206,7 +208,7 @@ bin/spc micro:combine my-app.phar -I "memory_limit=4G" -I "disable_functions=sys
|
||||
|
||||
> 有些情况下的 phar 文件或 PHP 项目可能无法在 micro 环境下运行。
|
||||
|
||||
### 使用 php-fpm
|
||||
### 使用 fpm
|
||||
|
||||
采用项目参数 `--build-fpm` 或 `--build-all` 时,最后编译结果会输出一个 `./php-fpm` 的文件。
|
||||
该文件存放在 `buildroot/bin/` 目录,拷贝出来即可使用。
|
||||
@ -216,7 +218,7 @@ bin/spc micro:combine my-app.phar -I "memory_limit=4G" -I "disable_functions=sys
|
||||
|
||||
指定 `php-fpm.conf` 可以使用命令参数 `-y`,例如:`./php-fpm -y php-fpm.conf`。
|
||||
|
||||
### 使用 php-embed
|
||||
### 使用 embed
|
||||
|
||||
采用项目参数 `--build-embed` 或 `--build-all` 时,最后编译结果会输出一个 `libphp.a`、`php-config` 以及一系列头文件,存放在 `buildroot/`,你可以在你的其他代码中引入它们。
|
||||
|
||||
|
||||
10
README.md
10
README.md
@ -172,7 +172,9 @@ In addition, we build NTS by default. If you are going to build ZTS version, jus
|
||||
|
||||
Adding option `--no-strip` can produce binaries with debug symbols, in order to debug (using gdb). Disabling strip will increase the size of static binary.
|
||||
|
||||
### php-cli Usage
|
||||
## Different SAPI Usage
|
||||
|
||||
### Use cli
|
||||
|
||||
> php-cli is a single static binary, you can use it like normal php installed on your system.
|
||||
|
||||
@ -189,7 +191,7 @@ cd buildroot/bin/
|
||||
./php your_project.phar # run your phar (project archive)
|
||||
```
|
||||
|
||||
### micro.sfx Usage
|
||||
### Use micro
|
||||
|
||||
> phpmicro is a SelF-extracted eXecutable SAPI module,
|
||||
> provided by [phpmicro](https://github.com/dixyes/phpmicro) project.
|
||||
@ -225,7 +227,7 @@ bin/spc micro:combine my-app.phar -I "memory_limit=4G" -I "disable_functions=sys
|
||||
|
||||
> In some cases, PHAR files may not run in a micro environment.
|
||||
|
||||
### php-fpm Usage
|
||||
### Use fpm
|
||||
|
||||
When using the parameter `--build-all` or `--build-fpm`,
|
||||
the final compilation result will output a file named `./php-fpm`,
|
||||
@ -236,7 +238,7 @@ Because php-fpm must specify a configuration file before running, the php-fpm co
|
||||
|
||||
Specifying `php-fpm.conf` can use the command parameter `-y`, for example: `./php-fpm -y php-fpm.conf`.
|
||||
|
||||
### Embed Usage
|
||||
### Use embed
|
||||
|
||||
When using the project parameters `--build-embed` or `--build-all`,
|
||||
the final compilation result will output a `libphp.a`, `php-config` and a series of header files,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user