home *** CD-ROM | disk | FTP | other *** search
/ Enter 2004 June / ENTER.ISO / files / xampp-win32-1.4.5-installer.exe / xampp / test_compatibility.php < prev    next >
Encoding:
PHP Script  |  2004-03-24  |  1.9 KB  |  46 lines

  1. <?php
  2. /* vim: set expandtab tabstop=4 shiftwidth=4: */
  3. // +----------------------------------------------------------------------+
  4. // | Copyright (c) 2002 Brent Cook                                        |
  5. // +----------------------------------------------------------------------+
  6. // | This library is free software; you can redistribute it and/or        |
  7. // | modify it under the terms of the GNU Lesser General Public           |
  8. // | License as published by the Free Software Foundation; either         |
  9. // | version 2.1 of the License, or (at your option) any later version.   |
  10. // |                                                                      |
  11. // | This library is distributed in the hope that it will be useful,      |
  12. // | but WITHOUT ANY WARRANTY; without even the implied warranty of       |
  13. // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU    |
  14. // | Lesser General Public License for more details.                      |
  15. // |                                                                      |
  16. // | You should have received a copy of the GNU Lesser General Public     |
  17. // | License along with this library; if not, write to the Free Software  |
  18. // | Foundation, Inc., 59 Temple Place, Suite 330,Boston,MA 02111-1307 USA|
  19. // +----------------------------------------------------------------------+
  20. // | Author: Brent Cook <busterb@mail.utexas.edu>                         |
  21. // +----------------------------------------------------------------------+
  22. //
  23. // $Id: test_compatibility.php,v 1.1 2002/09/25 01:19:08 busterb Exp $
  24. //
  25.  
  26. // test functionality of the dba compatibility layer
  27.  
  28. require_once 'DBA/Compatibility.php';
  29. $id = dba_open ("file_test", "n", "db3");
  30.  
  31. if (!$id) {
  32.     echo "dba_open failed\n";
  33.     exit;
  34. }
  35.  
  36. dba_insert ("key", "This is an example!", $id);
  37. dba_replace ("key", "This is another example!", $id);
  38.  
  39. if (dba_exists ("key", $id)) {
  40.     echo dba_fetch ("key", $id);
  41.     dba_delete ("key", $id);
  42. }
  43.  
  44. dba_close ($id);
  45. ?>
  46.