Firefox 3
Quick navigation:

ptb_create

Creates database file with header only, ie. security string (unless $secure is set to 0) and line with field names. If file with $filename already exists in the given $location, it is deleted. On error of creating the file either writing the header, message is displayed. Notice that in order to have unsecured file, you should set $secure to 0, not to false.

Syntax

ptb_create($filename, $location, $fieldnamesLine [, $secure = PTB_DEFAULT_SECURITY]);

Syntax description

$filename
name of file containing the database
$location
location of $filename; can be:
G
globally defined (in ptb_ini.php) directory
L
local directory (ie. the same where script calling ptb_connect is placed)
<path>
other, defined directory, eg. /samples/db (no trailing slash)
F
filename (ie. absolute or relative path without DOCUMENT_ROOT dependency)
$fieldnamesLine
names of fields, separated by a seperator (ie. pipe |)
$secure
optional: 1 (default value) if file should have security string in its first line; otherwise 0

Return

This function returns true on success and null (=false) on failure.

Sample(s)

ptb_create('country.php', 'G', 'id|country|capital');