mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-06 08:15:39 +08:00
deploy: 8d303348d9
This commit is contained in:
@@ -86,7 +86,7 @@ import{_ as s,c as e,o as a,ah as n}from"./chunks/framework.Bhsyh9kO.js";const k
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> doctor</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Quickly check and fix when it can be automatically repaired (use package management to install dependent packages, only support the above-mentioned operating systems and distributions)</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> doctor</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --auto-fix</span></span></code></pre></div><h3 id="command-build" tabindex="-1">Command - build <a class="header-anchor" href="#command-build" aria-label="Permalink to “Command - build”"></a></h3><p>Use the build command to start building the static php binary. Before executing the <code>bin/spc build</code> command, be sure to use the <code>download</code> command to download sources. It is recommended to use <code>doctor</code> to check the environment.</p><h4 id="basic-build" tabindex="-1">Basic build <a class="header-anchor" href="#basic-build" aria-label="Permalink to “Basic build”"></a></h4><p>You need to go to <a href="./extensions.html">Extension List</a> or <a href="./cli-generator.html">Command Generator</a> to select the extension you want to add, and then use the command <code>bin/spc build</code> to compile. You need to specify a compilation target, choose from the following parameters:</p><ul><li><code>--build-cli</code>: Build a cli sapi (command line interface, which can execute PHP code on the command line)</li><li><code>--build-fpm</code>: Build a fpm sapi (php-fpm, used in conjunction with other traditional fpm architecture software such as nginx)</li><li><code>--build-micro</code>: Build a micro sapi (used to build a standalone executable binary containing PHP code)</li><li><code>--build-embed</code>: Build an embed sapi (used to embed into other C language programs)</li><li><code>--build-frankenphp</code>: Build a <a href="https://github.com/php/frankenphp" target="_blank" rel="noreferrer">FrankenPHP</a> executable</li><li><code>--build-all</code>: build all above sapi</li></ul><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Compile PHP with bcmath,curl,openssl,ftp,posix,pcntl extensions, the compilation target is cli</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> doctor</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --auto-fix</span></span></code></pre></div><h3 id="command-build" tabindex="-1">Command - build <a class="header-anchor" href="#command-build" aria-label="Permalink to “Command - build”"></a></h3><p>Use the build command to start building the static php binary. Before executing the <code>bin/spc build</code> command, be sure to use the <code>download</code> command to download sources. It is recommended to use <code>doctor</code> to check the environment.</p><h4 id="basic-build" tabindex="-1">Basic build <a class="header-anchor" href="#basic-build" aria-label="Permalink to “Basic build”"></a></h4><p>You need to go to <a href="./extensions.html">Extension List</a> or <a href="./cli-generator.html">Command Generator</a> to select the extension you want to add, and then use the command <code>bin/spc build</code> to compile. You need to specify a compilation target, choose from the following parameters:</p><ul><li><code>--build-cli</code>: Build a cli sapi (command line interface, which can execute PHP code on the command line)</li><li><code>--build-fpm</code>: Build a fpm sapi (php-fpm, used in conjunction with other traditional fpm architecture software such as nginx)</li><li><code>--build-cgi</code>: Build a cgi sapi (cgi, rarely used)</li><li><code>--build-micro</code>: Build a micro sapi (used to build a standalone executable binary containing PHP code)</li><li><code>--build-embed</code>: Build an embed sapi (used to embed into other C language programs)</li><li><code>--build-frankenphp</code>: Build a <a href="https://github.com/php/frankenphp" target="_blank" rel="noreferrer">FrankenPHP</a> executable</li><li><code>--build-all</code>: build all above sapi</li></ul><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Compile PHP with bcmath,curl,openssl,ftp,posix,pcntl extensions, the compilation target is cli</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> bcmath,curl,openssl,ftp,posix,pcntl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --build-cli</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Compile PHP with phar,curl,posix,pcntl,tokenizer extensions, compile target is micro</span></span>
|
||||
@@ -81,7 +81,7 @@ import{_ as i,c as a,o as n,ah as l}from"./chunks/framework.Bhsyh9kO.js";const o
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> doctor</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 快速检查,并在可以自动修复的时候修复(使用包管理安装依赖包,仅支持上述提到的操作系统及发行版)</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> doctor</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --auto-fix</span></span></code></pre></div><h3 id="命令-build-编译-php" tabindex="-1">命令 build - 编译 PHP <a class="header-anchor" href="#命令-build-编译-php" aria-label="Permalink to “命令 build - 编译 PHP”"></a></h3><p>使用 build 命令可以开始构建静态 php 二进制,在执行 <code>bin/spc build</code> 命令前,务必先使用 <code>download</code> 命令下载资源,建议使用 <code>doctor</code> 检查环境。</p><h4 id="基本用法" tabindex="-1">基本用法 <a class="header-anchor" href="#基本用法" aria-label="Permalink to “基本用法”"></a></h4><p>你需要先到 <a href="./extensions.html">扩展列表</a> 或 <a href="./cli-generator.html">命令生成器</a> 选择你要加入的扩展,然后使用命令 <code>bin/spc build</code> 进行编译。你需要指定一个编译目标,从如下参数中选择:</p><ul><li><code>--build-cli</code>: 构建一个 cli sapi(命令行界面,可在命令行执行 PHP 代码)</li><li><code>--build-fpm</code>: 构建一个 fpm sapi(php-fpm,用于和其他传统的 fpm 架构的软件如 nginx 配合使用)</li><li><code>--build-micro</code>: 构建一个 micro sapi(用于构建一个包含 PHP 代码的独立可执行二进制)</li><li><code>--build-embed</code>: 构建一个 embed sapi(用于嵌入到其他 C 语言程序中)</li><li><code>--build-frankenphp</code>: 构建一个 <a href="https://github.com/php/frankenphp" target="_blank" rel="noreferrer">frankenphp</a> 二进制</li><li><code>--build-all</code>: 构建以上所有 sapi</li></ul><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 编译 PHP,附带 bcmath,curl,openssl,ftp,posix,pcntl 扩展,编译目标为 cli</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> doctor</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --auto-fix</span></span></code></pre></div><h3 id="命令-build-编译-php" tabindex="-1">命令 build - 编译 PHP <a class="header-anchor" href="#命令-build-编译-php" aria-label="Permalink to “命令 build - 编译 PHP”"></a></h3><p>使用 build 命令可以开始构建静态 php 二进制,在执行 <code>bin/spc build</code> 命令前,务必先使用 <code>download</code> 命令下载资源,建议使用 <code>doctor</code> 检查环境。</p><h4 id="基本用法" tabindex="-1">基本用法 <a class="header-anchor" href="#基本用法" aria-label="Permalink to “基本用法”"></a></h4><p>你需要先到 <a href="./extensions.html">扩展列表</a> 或 <a href="./cli-generator.html">命令生成器</a> 选择你要加入的扩展,然后使用命令 <code>bin/spc build</code> 进行编译。你需要指定一个编译目标,从如下参数中选择:</p><ul><li><code>--build-cli</code>: 构建一个 cli sapi(命令行界面,可在命令行执行 PHP 代码)</li><li><code>--build-fpm</code>: 构建一个 fpm sapi(php-fpm,用于和其他传统的 fpm 架构的软件如 nginx 配合使用)</li><li><code>--build-cgi</code>: 构建一个 cgi sapi(cgi,可用于传统的 cgi 架构的软件如 apache 配合使用)</li><li><code>--build-micro</code>: 构建一个 micro sapi(用于构建一个包含 PHP 代码的独立可执行二进制)</li><li><code>--build-embed</code>: 构建一个 embed sapi(用于嵌入到其他 C 语言程序中)</li><li><code>--build-frankenphp</code>: 构建一个 <a href="https://github.com/php/frankenphp" target="_blank" rel="noreferrer">frankenphp</a> 二进制</li><li><code>--build-all</code>: 构建以上所有 sapi</li></ul><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 编译 PHP,附带 bcmath,curl,openssl,ftp,posix,pcntl 扩展,编译目标为 cli</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> bcmath,curl,openssl,ftp,posix,pcntl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --build-cli</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 编译 PHP,附带 phar,curl,posix,pcntl,tokenizer 扩展,编译目标为 micro</span></span>
|
||||
Reference in New Issue
Block a user