Delicious Bookmark this on Delicious Share on Facebook SlashdotSlashdot It! Digg! Digg



PHP : Function Reference : Database (dbm-style) Abstraction Layer Functions : dba_open

dba_open

Open database (PHP 4, PHP 5)
resource dba_open ( string path, string mode [, string handler [, mixed ...]] )


Code Examples / Notes » dba_open

doppelbauer

Windows does not support locking the database. You may use $_ENV to determine the OS:
$locking = (stripos($_ENV['OS'],'windows') === false ? 'd' : 'l');


xy ät affenkrieger.de

If you get some strange errors like
dba_open(): myDbFilename.db : Permission denied
than you are propably using PHP on a Windoze machine. You have to make sure that the following conditions are met:
1) Use an absolute path to your db file. Relative paths will cause problems with locking
2) Specify a locking mode - that's the second character of the mode-argument, or else opening a dba-file will cause several notices/warnings etc.
And a final, general note:
3) Always use the english PHP doc on this site - the translations are often old as hell and miss important informations
HTH, Nils.


Change Language


Follow Navioo On Twitter
dba_close
dba_delete
dba_exists
dba_fetch
dba_firstkey
dba_handlers
dba_insert
dba_key_split
dba_list
dba_nextkey
dba_open
dba_optimize
dba_popen
dba_replace
dba_sync
eXTReMe Tracker