我正在尝试使用 Xhprof 设置 Xhgui。我遵循了 github 说明(https://github.com/perftools/xhgui),但此错误消息不断出现在错误日志中:
“xhgui - 要插入的文档包含无效键:键不能包含“。”:“main()==>load...”
看起来 mongoDB 不能在键中使用点,但 Xhgui 正在尝试这样做。
有没有办法在 mongoDB 中禁用这个限制?或者在 Xhgui 中修复这个错误?
我正在尝试使用 Xhprof 设置 Xhgui。我遵循了 github 说明(https://github.com/perftools/xhgui),但此错误消息不断出现在错误日志中:
“xhgui - 要插入的文档包含无效键:键不能包含“。”:“main()==>load...”
看起来 mongoDB 不能在键中使用点,但 Xhgui 正在尝试这样做。
有没有办法在 mongoDB 中禁用这个限制?或者在 Xhgui 中修复这个错误?
https://github.com/perftools/xhgui/issues/209#issuecomment-339281276
对于遇到此问题的任何人,我都可以通过在 ignore_user_abort(true) 之前将以下代码片段添加到 xhgui/external/header.php 来使其工作;称呼。不知道这有多正确,以及它是否会影响其他任何事情,但它对我有用。
$profile = [];
foreach($data['profile'] as $key => $value) {
$profile[strtr($key, ['.' => '_'])] = $value;
}
$data['profile'] = $profile;