Array to string conversion error in PHP

后端 未结 3 820
遇见更好的自我
遇见更好的自我 2021-01-28 12:54

I have following code to backtrace the error ....but its

$traces = debug_backtrace();

foreach ($traces as $k => $v)
{
    if ($v[\'function\'] == \'include\         


        
3条回答
  •  孤独总比滥情好
    2021-01-28 13:21

    You are not creating array properly

     $args .= $v['args'][$key];
    

    You are creating a string.

     $args = array(); 
                    if(isset($v['args']) && is_array($v['args']))
                    {
                        $size = count($v['args']);
                        foreach ($v['
                        args'] as $key => $arg)
                        {
                            array_push($args,$v['args'][$key]);
                           // some of your code
                    }
    

提交回复
热议问题