mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
update README
This commit is contained in:
parent
48f40b4304
commit
018c76ba41
14
README-en.md
14
README-en.md
@ -16,7 +16,7 @@ This function is provided by [dixyes/phpmicro](https://github.com/dixyes/phpmicr
|
||||
## Compilation Requirements
|
||||
|
||||
Yes, this project is written in PHP, pretty funny.
|
||||
But php-static-cli runtime only requires an environment above PHP 8.0 and tokenizer extension.
|
||||
But static-php-cli runtime only requires an environment above PHP 8.0 and `tokenizer`, `iconv` extension.
|
||||
|
||||
Here is the architecture support status, where `CI` represents support for GitHub Action builds,
|
||||
`Local` represents support for local builds, and blank represents not currently supported.
|
||||
@ -29,7 +29,7 @@ Here is the architecture support status, where `CI` represents support for GitHu
|
||||
|
||||
> linux-aarch64 and macOS-arm64 is not supported for GitHub Actions, if you are going to build on arm, you can build it manually on your own machine.
|
||||
|
||||
Currently supported PHP versions for compilation are: 7.4, 8.0, 8.1, 8.2.
|
||||
Currently supported PHP versions for compilation are: `7.4`, `8.0`, `8.1`, `8.2`.
|
||||
|
||||
## Usage
|
||||
|
||||
@ -113,12 +113,14 @@ If anything goes wrong, use `--debug` option to display full terminal output:
|
||||
When using the parameter `--build-all` or not adding the `--build-micro` parameter,
|
||||
the final compilation result will output a binary file named `./php`,
|
||||
which can be distributed and used directly.
|
||||
This file will be located in the directory `source/php-src/sapi/cli/`, simply copy it out for use.
|
||||
This file will be located in the directory `buildroot/bin/`, copy it out for use.
|
||||
|
||||
```bash
|
||||
./php -v
|
||||
./php -m
|
||||
./php your_code.php
|
||||
cd buildroot/bin/
|
||||
./php -v # check version
|
||||
./php -m # check extensions
|
||||
./php your_code.php # run your php code
|
||||
./php your_project.phar # run your phar (project archive)
|
||||
```
|
||||
|
||||
### micro.sfx Usage
|
||||
|
||||
@ -111,10 +111,11 @@ chmod +x bin/spc
|
||||
该文件编译后会存放在 `buildroot/bin/` 目录中,名称为 `php`,拷贝出来即可。
|
||||
|
||||
```bash
|
||||
cd buildroot/
|
||||
./php -v
|
||||
./php -m
|
||||
./php your_code.php
|
||||
cd buildroot/bin/
|
||||
./php -v # 检查版本
|
||||
./php -m # 检查编译的扩展
|
||||
./php your_code.php # 运行代码
|
||||
./php your_project.phar # 运行打包为 phar 单文件的项目
|
||||
```
|
||||
|
||||
### 使用 micro.sfx
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user