Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
longxinH authored Mar 23, 2017
1 parent 2ec4dd5 commit 1813c8a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ XHProf is a function-level hierarchical profiler for PHP and has a simple HTML b

This version supports PHP7

#Installation
# Installation
```
git clone https://github.com/longxinH/xhprof.git ./xhprof
cd xhprof/extension/
Expand All @@ -12,15 +12,15 @@ cd xhprof/extension/
make && sudo make install
```

####configuration add to your php.ini
#### configuration add to your php.ini
```
[xhprof]
extension = xhprof.so
xhprof.output_dir = /tmp/xhprof
```

#新增
####pdo占位符转换
# 新增
#### pdo占位符转换
pdo预处理占位符将会转换成实际的参数,更好的掌握mysql执行消耗(只用做xhprof记录,不改变程序执行过程)
```php
$_sth = $db->prepare("SELECT * FROM user where userid = :id and username = :name");
Expand All @@ -31,21 +31,21 @@ $_sth = $db->prepare("SELECT * FROM user where userid = ?");
$_sth->execute([1]);
$data2 = $_sth->fetch();
```
#####xhprof记录数据
##### xhprof记录数据
```
PDOStatement::execute#SELECT * FROM user where userid = 1 and username = admin
PDOStatement::execute#SELECT * FROM user where userid = 1
```

####curl地址记录
#### curl地址记录
```php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://www.baidu.com");
$output = curl_exec($ch);
curl_close($ch);
```
#####xhprof记录数据
##### xhprof记录数据
```
curl_exec#http://www.baidu.com
```

0 comments on commit 1813c8a

Please sign in to comment.