gpt4 book ai didi

php - xhprof/xhgui : xhgui - document to insert contains invalid key: keys cannot contain "."

转载 作者:可可西里 更新时间:2023-11-01 09:48:12 26 4
gpt4 key购买 nike

我正在尝试使用 Xhprof 设置 Xhgui。我遵循了 github 说明( https://github.com/perftools/xhgui ),但此错误消息不断出现在错误日志中:

"xhgui - document to insert contains invalid key: keys cannot contain ".": "main()==>load..."

看起来 mongoDB 不能在键中使用点,但 Xhgui 正在尝试这样做。

有没有办法在 mongoDB 中禁用此限制?或者修复 Xhgui 中的这个错误?

最佳答案

https://github.com/perftools/xhgui/issues/209#issuecomment-339281276

For anyone experiencing this issue, I was able to make it work by adding the following snippet of code to xhgui/external/header.php right before ignore_user_abort(true); call. Not sure how correct is this and if it could affect anything else, but it did the trick for me.

    $profile = [];
foreach($data['profile'] as $key => $value) {
$profile[strtr($key, ['.' => '_'])] = $value;
}
$data['profile'] = $profile;

关于php - xhprof/xhgui : xhgui - document to insert contains invalid key: keys cannot contain ".",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46466324/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com