__PHP_Incomplete_Class_Name wrong

后端 未结 10 1441
小蘑菇
小蘑菇 2020-12-10 04:15

We\'re randomly getting some very strange error logs. They don\'t happen on every page hit, even with the same parameters/actions/etc, and they don\'t seem repeatable, each

10条回答
  •  隐瞒了意图╮
    2020-12-10 04:33

    This happens when we try to initialize the session before loading the class definitions for the object we are trying to save into the session.

    you can use simply json methods in PHP

    json_encode that array and again json_decode that array and save it in a variable and than print that variable. you will get a simple array.

    eg.

    $array = array(); // this is your array variable to whom you are trying to save in a session
    $encode = json_encode($array);
    $decode = json_decode($encode);
    echo '
    ';
    print_r($decode);
    

    it will work surely.

提交回复
热议问题