From 018c76ba41606a0d6b3331cdf46276963d76a89a Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sat, 22 Apr 2023 22:25:01 +0800 Subject: [PATCH] update README --- README-en.md | 14 ++++++++------ README.md | 9 +++++---- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/README-en.md b/README-en.md index 3a7fc522..bb6a88e2 100755 --- a/README-en.md +++ b/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 diff --git a/README.md b/README.md index 207ce33b..0d0c5d0f 100755 --- a/README.md +++ b/README.md @@ -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