wget https://pecl.php.net/get/v8js-2.1.0.tgz

tar -xvf v8js-2.1.0.tgz

cd v8js-2.1.0

phpize

 ./configure --with-v8js=/opt/v8 LDFLAGS="-lstdc++" CPPFLAGS="-DV8_COMPRESS_POINTERS" --with-php-config=/www/server/php/72/bin/php-config

复制modules目录下的v8js.so

/www/server/php/72/lib/php/extensions/no-debug-non-zts-*

最后在PHP配置文件中增加

extension =  /www/server/php/72/lib/php/extensions/no-debug-non-zts-*/v8js.so

v8.7z
v8js-2.1.0.tgz
v8js.7z

Last modification:August 28, 2024
如果觉得我的文章对你有用,请随意赞赏