suchen
Heimphp教程php手册window wamp中配置安装xhprof步骤

window wamp中配置安装xhprof步骤

Jun 13, 2016 am 10:10 AM
wampwindow介绍Mitschülerexistieren安装Artikel步骤配置

本文章来给各位同学介绍在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配置里面加入配置(不要忘记创建对应的文件夹)

 代码如下 复制代码

[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”

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

3.使用:

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
还在学习使用中,写上几个缩写的

Stellungnahme
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn

Heiße KI -Werkzeuge

Undresser.AI Undress

Undresser.AI Undress

KI-gestützte App zum Erstellen realistischer Aktfotos

AI Clothes Remover

AI Clothes Remover

Online-KI-Tool zum Entfernen von Kleidung aus Fotos.

Undress AI Tool

Undress AI Tool

Ausziehbilder kostenlos

Clothoff.io

Clothoff.io

KI-Kleiderentferner

AI Hentai Generator

AI Hentai Generator

Erstellen Sie kostenlos Ai Hentai.

Heißer Artikel

R.E.P.O. Energiekristalle erklärten und was sie tun (gelber Kristall)
3 Wochen vorBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Beste grafische Einstellungen
3 Wochen vorBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. So reparieren Sie Audio, wenn Sie niemanden hören können
3 Wochen vorBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: Wie man alles in Myrise freischaltet
4 Wochen vorBy尊渡假赌尊渡假赌尊渡假赌

Heiße Werkzeuge

SAP NetWeaver Server-Adapter für Eclipse

SAP NetWeaver Server-Adapter für Eclipse

Integrieren Sie Eclipse mit dem SAP NetWeaver-Anwendungsserver.

PHPStorm Mac-Version

PHPStorm Mac-Version

Das neueste (2018.2.1) professionelle, integrierte PHP-Entwicklungstool

Sicherer Prüfungsbrowser

Sicherer Prüfungsbrowser

Safe Exam Browser ist eine sichere Browserumgebung für die sichere Teilnahme an Online-Prüfungen. Diese Software verwandelt jeden Computer in einen sicheren Arbeitsplatz. Es kontrolliert den Zugriff auf alle Dienstprogramme und verhindert, dass Schüler nicht autorisierte Ressourcen nutzen.

Dreamweaver Mac

Dreamweaver Mac

Visuelle Webentwicklungstools

MinGW – Minimalistisches GNU für Windows

MinGW – Minimalistisches GNU für Windows

Dieses Projekt wird derzeit auf osdn.net/projects/mingw migriert. Sie können uns dort weiterhin folgen. MinGW: Eine native Windows-Portierung der GNU Compiler Collection (GCC), frei verteilbare Importbibliotheken und Header-Dateien zum Erstellen nativer Windows-Anwendungen, einschließlich Erweiterungen der MSVC-Laufzeit zur Unterstützung der C99-Funktionalität. Die gesamte MinGW-Software kann auf 64-Bit-Windows-Plattformen ausgeführt werden.