mirror of
https://github.com/php/doc-es.git
synced 2026-03-24 07:22:16 +01:00
117 lines
3.0 KiB
XML
117 lines
3.0 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: seros Status: ready -->
|
|
<refentry xml:id="function.dbase-open" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>dbase_open</refname>
|
|
<refpurpose>Abre una base de datos</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> abre una base de datos dBase con el modo de
|
|
acceso dado.
|
|
</para>
|
|
¬e.open-basedir.func;
|
|
</refsect1>
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>filename</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
El nombre de la base de datos. Puede ser una ruta relativa o absoluta al
|
|
archivo donde dBase almacenará la información.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>mode</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Un entero que se corresponde a aquéllos de la llamada al sistema de
|
|
<command>open()</command> (Normalmente 0 significa sólo lectura, 1 sólo escritura, y 2
|
|
lectura y escritura).
|
|
</para>
|
|
<note>
|
|
<para>
|
|
No se puede abrir un archivo dBase en modo sólo escritura ya que la función
|
|
fallará al leer la información de las cabeceras, por lo que no se puede usar 1 como
|
|
<parameter>mode</parameter>.
|
|
</para>
|
|
</note>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Abrir un archivo de base de datos de dBase</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
// abrir en modo sólo lectura
|
|
$db = dbase_open('/tmp/test.dbf', 0);
|
|
|
|
if ($db) {
|
|
// leer alguna información ..
|
|
|
|
dbase_close($db);
|
|
}
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Devuelve un identificador de enlace de la base de datos si ésta se abrió con éxito,
|
|
o &false; si ocurrió un error.
|
|
</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:"~/.phpdoc/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
|
|
-->
|