Skip to content

Commit 479e700

Browse files
authored
Update requirement.md
1 parent fbafdc1 commit 479e700

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/zh/guide/requirement.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,24 @@ extension=vips.so
212212
php -m | grep FFI
213213
```
214214

215-
如果输出 ffi,说明已经启用。如果没有,编辑 php.ini 配置文件,搜索 `ffi.enable`,增加配置以启用:
215+
如果输出 ffi,说明已经启用。如果没有,可能需要安装并启用。
216+
217+
我们以宝塔的 PHP 8.2 为例,演示如何按照 ffi 拓展:
218+
219+
```shell
220+
cd /www/server/php/82/src/ext/ffi
221+
`
222+
223+
编译扩展
224+
225+
```shell
226+
www/server/php/82/bin/phpize
227+
./configure --with-php-config=/www/server/php/82/bin/php-config
228+
make
229+
make install
230+
```
231+
232+
安装成功后,编辑配置文件:`/www/server/php/82/etc/php.ini`,搜索 `ffi`,增加配置以启用:
216233

217234
```ini
218235
extension=ffi

0 commit comments

Comments
 (0)