PHP7使用xhprof分析性能
注:该扩展在Linux下运行
一丶安装
git clone https://github.com/yaoguais/phpng-xhprof.git ./xhprof
cd xhprof
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make clean && make && make test && sudo make install
二丶修改PHP配置文件
// 加入下方代码
[xhprof]
extension = phpng_xhprof.so
xhprof.output_dir = /tmp/xhprof
三丶查看是否安装成功
新建一个phpinfo.php
<?php
phpinfo();
访问phpinfo.php文件
四丶如何使用
本文基于《署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)》许可协议授权
文章链接:https://blog.wz52.cn/archives/66.html (转载时请注明本文出处及文章链接)