Array to string conversion error in PHP

后端 未结 3 914
遇见更好的自我
遇见更好的自我 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:32

    you begin with:

    foreach($traces as $k=>$v) <- $traces here is an array
    

    then you try to do

    $traces.= "xxx" <- $traces here is handled as a string
    

    i would rather define a $tracestr string for aggregating text content.

提交回复
热议问题