This is a discussion on dba_open() problem within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Simple question, I hope. I have read everywhere that the following code should work : <?php $id = dba_open( "/tmp/...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Simple question, I hope.
I have read everywhere that the following code should work : <?php $id = dba_open( "/tmp/test.db", "n", "db4" ) or die( "Couldn't open database" ); dba_close($id); ?> When I run it, the database is created without a problem but the die() statement is executed. Any idea why it can create the DB but it tells me it can't? Thanks, Patrick |
|
|||
|
"Patrick Drouin" <patrick.drouin@gmail.com> wrote in message news:cJGdnSHUI_TcAX7eRVn-ig@umontreal.ca... > Simple question, I hope. > > I have read everywhere that the following code should work : > > <?php > > $id = dba_open( "/tmp/test.db", "n", "db4" ) resource dba_open ( string path, string mode [, string handler [, mixed ....]] ) you are using db4 as an optional handler? I don't see the handler listed in your code. unfortunately, I see no user-notes in the CHM manual on this function. > or die( "Couldn't open database" ); > dba_close($id); > ?> > > When I run it, the database is created without a problem but the die() > statement is executed. Any idea why it can create the DB but it tells me > it can't? > > Thanks, > Patrick |