<?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.9 $ --> <refentry id="function.dbase-open"> <refnamediv> <refname>dbase_open</refname> <refpurpose>Opens a database</refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>int</type><methodname>dbase_open</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> <methodparam><type>int</type><parameter>mode</parameter></methodparam> </methodsynopsis> <para> <function>dbase_open</function> opens a dBase database with the given access mode. </para> ¬e.sm.uidcheck; ¬e.open-basedir.func; </refsect1> <refsect1 role="parameters"> &reftitle.parameters; <para> <variablelist> <varlistentry> <term><parameter>filename</parameter></term> <listitem> <para> The name of the database. It can be a relative or absolute path to the file where dBase will store your data. </para> </listitem> </varlistentry> <varlistentry> <term><parameter>mode</parameter></term> <listitem> <para> An integer which correspond to those for the <command>open()</command> system call (Typically 0 means read-only, 1 means write-only, and 2 means read and write). </para> <note> <para> You can't open a dBase file in write-only mode as the function will fail to read the headers infomation and thus you can't use 1 as <parameter>mode</parameter>. </para> </note> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 role="examples"> &reftitle.examples; <para> <example> <title>Opening a dBase database file</title> <programlisting role="php"> <![CDATA[ <?php // open in read-only mode $db = dbase_open('/tmp/test.dbf', 0); if ($db) { // read some data .. dbase_close($db); } ?> ]]> </programlisting> </example> </para> </refsect1> <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> Returns a database link identifier if the database is successfully opened, or &false; if an error occured. </para> </refsect1> <refsect1 role="seealso"> &reftitle.seealso; <para> <simplelist> <member><function>dbase_create</function></member> <member><function>dbase_close</function></member> </simplelist> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->