Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: class error

  1. #1
    New Coder
    Join Date
    Dec 2003
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts

    class error

    PHP Code:
    <?php

    session_start
    ();

        
    $go = new k_ex(); //ERROR OCCURS HERE!
        
    $errormsg "Thak You!You are logged out.<br>\n";
        
    $go->error($errormsg,"..");



    if(!isset(
    $_SESSION['uvname'])){

        
    session_destroy();
        unset(
    $_SESSION['uvname']);
        
    session_unregister('uvname');


    }
    ?>

    when i call the k_ex class i get an error saying
    PHP Code:
    Fatal errorCannot instantiate non-existent class: k_ex in e:..........out.php on line 5 
    line 5 is the " $go = new k_ex(); //ERROR OCCURS HERE!".
    the thing is that i used the same thing from some other file and i get no error!

    please someone help.

  • #2
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,266
    Thanks
    6
    Thanked 48 Times in 48 Posts
    You're not including your class to the script


  •  

    Posting Permissions

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