login  Naam:   Wachtwoord: 
Registreer je!
 Forum

FATAL ERROR

Offline SilVeX - 26/09/2006 09:46
Avatar van SilVeXHTML beginner Fatal error: Class unlocktablecmd: Cannot inherit from undefined class command in /var/www/kris/spel/UnlockTableCmd.php on line 8



  1. <?php
  2. require_once( "DB.php" );
  3. require_once( "Command.php" );
  4. require_once( "LockTableCmd.php" );
  5.  
  6. require_once( "settings.php" );
  7.  
  8. class UnlockTableCmd extends Command
  9. {
  10. function Execute( )
  11. {
  12. // connect to the db
  13. $db = DB::connect( $GLOBALS['g_PearDBDSN'] );
  14. if (DB::isError( $db ))
  15. {
  16. // let everyone know there was a problem
  17. $this->OnError("Failed to connect to the database using " . $GLOBALS['g_PearDBDSN']);
  18.  
  19. // return error
  20. return CMD_ERROR;
  21. }
  22.  
  23. // try to unlock
  24. $result = $db->Query( "UNLOCK TABLES" );
  25. if (DB::isError( $result ))
  26. {
  27. // let everyone know there was a problem
  28. $this->OnError("Failed to unlock the tables");
  29.  
  30. // return error
  31. return CMD_ERRROR;
  32. }
  33.  
  34. // this command is finished
  35. return CMD_FINISHED;
  36. }
  37. }
  38.  
  39. ?>

Dit is mijn code ik zie niet wat er fout gaat

2 antwoorden

Gesponsorde links
Offline Wijnand - 26/09/2006 09:48
Avatar van Wijnand Moderator Hoe ziet je andere class eruit (Command). Want als je naar de error kijkt:

Cannot inherit from undefined class command

Oftewel, hij kan de class command niet vinden, of er niet wijs uit worden.
Offline SilVeX - 26/09/2006 09:51
Avatar van SilVeX HTML beginner Verholpen 
in me Command.php stond me class "Command"
Maar ik had de class per ongeluk CCommand genoemd. . . . 
Gesponsorde links
Dit onderwerp is gesloten.
Actieve forumberichten
© 2002-2025 Sitemasters.be - Regels - Laadtijd: 0.196s