Fatal error: Call to a member function
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Fatal error: Call to a member function

  1. #1
    Join Date
    Jan 2010

    Fatal error: Call to a member function

    i'm trying to unserialize Object. i run the documentaion sample.
    code for classa.inc:

    PHP Code:
    class {
    $one 1;
    show_one() {


    code for page1:
    PHP Code:
    $a = new A;
    $s serialize($a);
    $nextPage "page2.php";
    header("Location: $nextPage");
    code for page2:
    PHP Code:
    $s =$_COOKIE["test"];
    $a unserialize($s);
    "a is an Object!<br/>"  ;
    "a is not an Object!<br/>";
    Simple right.
    result when run page1
    a is not an Object!
    i check and cookie test have been creted
    i can't find why i cant use the object?
    thanks for any help..
    Last edited by PeejAvery; January 14th, 2010 at 01:34 PM. Reason: Added PHP tags.

  2. #2
    PeejAvery's Avatar
    PeejAvery is offline Super Moderator Power Poster
    Join Date
    May 2002

    Re: Fatal error: Call to a member function

    Don't you love magic quotes?

    PHP Code:
    $s stripslashes($_COOKIE["test"]); 
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)