Skip to content

Commit a266419

Browse files
committed
ini 指令一节
1 parent e94dd19 commit a266419

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

book/chapt11/11-02-00-extension-hello-world.markdown

+2
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@ PHP 源代码目录中提供了一个可执行文件 `ext/ext_skel`,该文件
154154
[shell]
155155
php7ize
156156
...
157+
./configure --with-php-config=/usr/local/php7/bin/php-config
158+
...
157159
make && make install
158160
159161
### 5. 测试

book/chapt11/11-04-00-ini-set.markdown

+8-2
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,15 @@
5454
编译的步骤不再重复说明,请参考本章开头的方式
5555

5656
[shell]
57-
php7 -d"extension=tipi_ini_demo.so" -r "var_dump(get_demo_init_value());"
57+
[root@localhost tipi_ini_demo]# php7 -d"extension=tipi_ini_demo.so" -r "var_dump(get_demo_init_value());"
58+
int(42)
5859

59-
执行结果为42。然后,添加 `php.ini` 指令
60+
执行结果为42。然后编辑 `php.ini`
61+
62+
[shell]
63+
vim /usr/local/php7/etc/php.ini
64+
65+
添加指令
6066

6167
[shell]
6268
tipi_ini_demo.global_value = 100

0 commit comments

Comments
 (0)