Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php json_encode(debug_backtrace())返回;8-类型不受支持“;_Php_Arrays_Json - Fatal编程技术网

Php json_encode(debug_backtrace())返回;8-类型不受支持“;

Php json_encode(debug_backtrace())返回;8-类型不受支持“;,php,arrays,json,Php,Arrays,Json,我有PHP7.3.27。我正试图在我的数据库中存储debug_backtrace()的JSON编码版本。但是, $bt = json_encode(debug_backtrace()); echo json_last_error() . ' - ' . json_last_error_msg(); 返回: 8 - Type is not supported 如果我打印: echo gettype(debug_backtrace()); 它返回: array 所以我不确定我为什么会犯这样的

我有PHP7.3.27。我正试图在我的数据库中存储debug_backtrace()的JSON编码版本。但是,

$bt = json_encode(debug_backtrace());
echo json_last_error() . ' - ' . json_last_error_msg();
返回:

8 - Type is not supported
如果我打印:

echo gettype(debug_backtrace());
它返回:

array

所以我不确定我为什么会犯这样的错误。我从未在我尝试过的任何数组上遇到过json_encode的这个问题。

数组中的一个值可能是一个资源,无法序列化…很好的调用!看起来就是这样。如果我打印(debug\u backtrace()),看起来好像有一个资源。现在要想办法解决这个问题。。。