Session, PHP Incomplete Class

前端 未结 2 1616
夕颜
夕颜 2020-12-21 09:46

I am using cakePHP 2.x . Currently doing about the twitter OAuth, http://code.42dh.com/oauth/.

function twitter_authentication()
{
            //assume above         


        
2条回答
  •  盖世英雄少女心
    2020-12-21 10:15

    "PHP Incomplete Class" means PHP doesn't have a class definition for the object you're loading.

    Option A: figure out what class that object is when you write it into the session and ensure that class's definition is loaded before loading the object.

    Option B: convert the object to an stdClass or array before writing it, and convert back after loading. This might be more complex than the first option.

提交回复
热议问题