PHP Salt


A little dash of PHP... my collection of php functions

Version: 2.24.1
Last Build: May 09, 2019 21:57pm (PST)

Main Menu

Home

Get PHP Salt


The Functions

array
db
file
graph
html
mail
math
misc
mobile
script
string
system
time
psBDB_writeKey()
Write a key entry


Description:

This will write a value for a key in a Berkeley DB file



Usage:

psBDB_writeKey($dbFile,$key,$val);
$dbFile = file name of the db file
$key = key name
$val = value to be written



Example:


psBDB_writeKey("/tmp/people.db","mb0005","mike,310-555-1212");





Code:

// deletes a key from db
function psBDB_writeKey($dbFile,$key,$val)
{
$db = dba_open($dbFile, "cl" ,"db4");
if ($db !== false)
{
dba_replace($key, $val, $db);
dba_close($db);
}
}




Changlelog:

05-09-2019 v2.24 function added

And a shot out to:

PHP - php.net
Fedora Server - getfedora.com
Shameless ads to pay for site