搜索
首页php教程php手册window wamp中配置安装xhprof步骤

window wamp中配置安装xhprof步骤

Jun 13, 2016 am 10:10 AM
wampwindow介绍同学安装文章步骤配置

本文章来给各位同学介绍在window wamp中配置安装xhprof方法与具体步骤,希望些方法对各位同学会有所帮助哦。

1.下载在这里 http://dev.freshsite.pl/php-extensions/xhprof.html 如果你下载不下来,可以给16090288@qq.com发邮件,说明版本。

我使用的是wamp 2.2d 32位的 ,这里罗嗦一句,既然用windows的wamp了,就不要装64位了,毕竟都是开发环境,正式环境肯定是32位的

这里下载两个文件 XHProf 0.10.3 for PHP 5.3 vc9.zip xhprof_html.zip

2.安装。 这步骤很简单,把XHProf 0.10.3 for PHP 5.3 vc9.zip里面的dll文件重命名为 php_xhprof.dll 放在php的ext目录下,然后在php.ini配置里面加入配置(不要忘记创建对应的文件夹)

3.使用:
 代码如下
 代码如下 复制代码

[xhprof]
extension=php_xhprof.dll
; directory used by default implementation of the iXHProfRuns
; interface (namely, the XHProfRuns_Default class) for storing
; XHProf runs.
xhprof.output_dir=”d:/wamp/logs/xhprof_log”

复制代码

[xhprof]

extension=php_xhprof.dll

; directory used by default implementation of the iXHProfRuns

; interface (namely, the XHProfRuns_Default class) for storing

; XHProf runs.

xhprof.output_dir=”d:/wamp/logs/xhprof_log”

 代码如下 复制代码

xhprof_enable();//开始
require 'init.php';
require 'conf/db.inc.php';
$app = new Yaf_Application(BASE_PATH . "/conf/itxiangqin.ini");
Yaf_Registry::set('config', Yaf_Application::app()->getConfig());
$app->bootstrap()->run();
$xhprof_data = xhprof_disable();//结束,然后写入文件,注意目录
$XHPROF_ROOT = realpath(dirname(__FILE__).'/xhprof');
include_once $XHPROF_ROOT . "/xhprof_lib/utils/xhprof_lib.php";
include_once $XHPROF_ROOT . "/xhprof_lib/utils/xhprof_runs.php";

// save raw data for this profiler run using default
// implementation of iXHProfRuns.
$xhprof_runs = new XHProfRuns_Default();

// save the run under a namespace "xhprof_foo"
$run_id = $xhprof_runs->save_run($xhprof_data, "xhprof_foo");
echo "分析";//


重启你的wamp即可,看看phpinfo()里面有没有对应的文件

xhprof_html.zip 这个文件解压到你想测试的网站根目录就好了 现在网站一般使用的是框架,唯一入口这点最好了,直接在index.php里面写就好了,我用的是yaf框架  
 代码如下 复制代码
xhprof_enable();//开始 require 'init.php'; require 'conf/db.inc.php'; $app = new Yaf_Application(BASE_PATH . "/conf/itxiangqin.ini"); Yaf_Registry::set('config', Yaf_Application::app()->getConfig()); $app->bootstrap()->run(); $xhprof_data = xhprof_disable();//结束,然后写入文件,注意目录 $XHPROF_ROOT = realpath(dirname(__FILE__).'/xhprof'); include_once $XHPROF_ROOT . "/xhprof_lib/utils/xhprof_lib.php"; include_once $XHPROF_ROOT . "/xhprof_lib/utils/xhprof_runs.php"; // save raw data for this profiler run using default // implementation of iXHProfRuns. $xhprof_runs = new XHProfRuns_Default(); // save the run under a namespace "xhprof_foo" $run_id = $xhprof_runs->save_run($xhprof_data, "xhprof_foo"); echo "分析";// 这里的pztai换成你自己的域名就好了,本地就localhost分析";//这里的pztai换成你自己的域名就好了,本地就localhost 还在学习使用中,写上几个缩写的
声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn

热AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover

AI Clothes Remover

用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool

Undress AI Tool

免费脱衣服图片

Clothoff.io

Clothoff.io

AI脱衣机

Video Face Swap

Video Face Swap

使用我们完全免费的人工智能换脸工具轻松在任何视频中换脸!

热工具

SecLists

SecLists

SecLists是最终安全测试人员的伙伴。它是一个包含各种类型列表的集合,这些列表在安全评估过程中经常使用,都在一个地方。SecLists通过方便地提供安全测试人员可能需要的所有列表,帮助提高安全测试的效率和生产力。列表类型包括用户名、密码、URL、模糊测试有效载荷、敏感数据模式、Web shell等等。测试人员只需将此存储库拉到新的测试机上,他就可以访问到所需的每种类型的列表。

PhpStorm Mac 版本

PhpStorm Mac 版本

最新(2018.2.1 )专业的PHP集成开发工具

WebStorm Mac版

WebStorm Mac版

好用的JavaScript开发工具

记事本++7.3.1

记事本++7.3.1

好用且免费的代码编辑器

DVWA

DVWA

Damn Vulnerable Web App (DVWA) 是一个PHP/MySQL的Web应用程序,非常容易受到攻击。它的主要目标是成为安全专业人员在合法环境中测试自己的技能和工具的辅助工具,帮助Web开发人员更好地理解保护Web应用程序的过程,并帮助教师/学生在课堂环境中教授/学习Web应用程序安全。DVWA的目标是通过简单直接的界面练习一些最常见的Web漏洞,难度各不相同。请注意,该软件中