mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 12:54:52 +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
|
## Compilation Requirements
|
||||||
|
|
||||||
Yes, this project is written in PHP, pretty funny.
|
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,
|
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.
|
`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.
|
> 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
|
## 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,
|
When using the parameter `--build-all` or not adding the `--build-micro` parameter,
|
||||||
the final compilation result will output a binary file named `./php`,
|
the final compilation result will output a binary file named `./php`,
|
||||||
which can be distributed and used directly.
|
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
|
```bash
|
||||||
./php -v
|
cd buildroot/bin/
|
||||||
./php -m
|
./php -v # check version
|
||||||
./php your_code.php
|
./php -m # check extensions
|
||||||
|
./php your_code.php # run your php code
|
||||||
|
./php your_project.phar # run your phar (project archive)
|
||||||
```
|
```
|
||||||
|
|
||||||
### micro.sfx Usage
|
### micro.sfx Usage
|
||||||
|
|||||||
@ -111,10 +111,11 @@ chmod +x bin/spc
|
|||||||
该文件编译后会存放在 `buildroot/bin/` 目录中,名称为 `php`,拷贝出来即可。
|
该文件编译后会存放在 `buildroot/bin/` 目录中,名称为 `php`,拷贝出来即可。
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd buildroot/
|
cd buildroot/bin/
|
||||||
./php -v
|
./php -v # 检查版本
|
||||||
./php -m
|
./php -m # 检查编译的扩展
|
||||||
./php your_code.php
|
./php your_code.php # 运行代码
|
||||||
|
./php your_project.phar # 运行打包为 phar 单文件的项目
|
||||||
```
|
```
|
||||||
|
|
||||||
### 使用 micro.sfx
|
### 使用 micro.sfx
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user