svn: /phpdoc/es/trunk/reference/info/functions/ php-uname.xml
| From: | Yago Ferrer | Date: | Mon, 03 Oct 2011 19:05:58 +0000 |
| Subject: | svn: /phpdoc/es/trunk/reference/info/functions/ php-uname.xml | ||
| Groups: | php.doc.es | ||
| Request: | Send a blank email to doc-es+get-4995@lists.php.net to get a copy of this message | ||
yago Mon, 03 Oct 2011 19:05:58 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=317676
Log:
File translated by: Jert Zee and reviewed by: Yago
Changed paths:
A phpdoc/es/trunk/reference/info/functions/php-uname.xml
Added: phpdoc/es/trunk/reference/info/functions/php-uname.xml
===================================================================
--- phpdoc/es/trunk/reference/info/functions/php-uname.xml (rev 0)
+++ phpdoc/es/trunk/reference/info/functions/php-uname.xml 2011-10-03 19:05:58 UTC (rev 317676)
@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision$ -->
+<!-- EN-Revision: 297028 Maintainer: yago Status: ready -->
+<!-- Reviewed: no -->
+<refentry xml:id="function.php-uname" xmlns="http://docbook.org/ns/docbook">
+ <refnamediv>
+ <refname>php_uname</refname>
+ <refpurpose>Devuelve información sobre el sistema operativo en que se está ejecutando
PHP</refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description">
+ &reftitle.description;
+ <methodsynopsis>
+ <type>string</type><methodname>php_uname</methodname>
+ <methodparam
choice="opt"><type>string</type><parameter>mode</parameter><initializer>"a"</initializer></methodparam>
+ </methodsynopsis>
+ <para>
+ <function>php_uname</function> devuelve una descripción del sistema
+ operativo en que se está ejecutando PHP. Esta misma información se muestra en la parte
+ superior de <function>phpinfo</function>. Para obtener solamente el nombre
+ del sistema operativo, considere el uso de la constante <constant>PHP_OS</constant>,
+ pero tenga en mente que la constante contendrá el sistema operativo
+ en que PHP fue <emphasis>compilado</emphasis>.
+ </para>
+ <para>
+ En algunos sistemas más antigos de UNIX, es posible que no se pueda determinar
+ la información del SO actual en cuyo caso se revertirá mostrando el SO en que PHP
+ fue compilado. Esto solo sucederá si la llamada a la libreria uname()
+ no existe o no funciona.
+ </para>
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <para>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>mode</parameter></term>
+ <listitem>
+ <para>
+ <parameter>mode</parameter> es un caracter simple que define
+ qué información es devuelta:
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ <literal>'a'</literal>: Elegida por defecto. Contiene todos los
modos en
+ la secuencia <literal>"s n r v m"</literal>.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <literal>'s'</literal>: Nombre del sistema operativo. ej.
+ <literal>FreeBSD</literal>.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <literal>'n'</literal>: Nombre del Host. ej.
+ <literal>localhost.example.com</literal>.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <literal>'r'</literal>: Nombre de la versión liberada. ej.
+ <literal>5.1.2-RELEASE</literal>.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <literal>'v'</literal>: Información de la versión. Varia mucho
entre los
+ sistemas operativos.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <literal>'m'</literal>: Tipo de máquina. ej.
<literal>i386</literal>.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ Devuelve la descripción, como una cadena de texto.
+ </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title>Algúnos ejemplos de <function>php_uname</function></title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+echo php_uname();
+echo PHP_OS;
+
+/* Algúnos posibles resultados:
+Linux localhost 2.4.21-0.13mdk #1 Fri Mar 14 15:08:06 EST 2003 i686
+Linux
+
+FreeBSD localhost 3.2-RELEASE #15: Mon Dec 17 08:46:02 GMT 2001
+FreeBSD
+
+Windows NT XN1 5.1 build 2600
+WINNT
+*/
+
+if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
+ echo 'Este un servidor usando Windows!';
+} else {
+ echo 'Este es un servidor que no usa Windows!';
+}
+
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
+ <para>
+ También existen algunas <link linkend="language.constants.predefined">
+ constantes PHP predefinidas</link> que pueden ser útiles, por ejemplo:
+ <example>
+ <title>Algunos ejemplos de las constantes relacionadas al SO</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+// *nix
+echo DIRECTORY_SEPARATOR; // /
+echo PHP_SHLIB_SUFFIX; // so
+echo PATH_SEPARATOR; // :
+
+// Win*
+echo DIRECTORY_SEPARATOR; // \
+echo PHP_SHLIB_SUFFIX; // dll
+echo PATH_SEPARATOR; // ;
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <para>
+ <simplelist>
+ <member><function>phpversion</function></member>
+ <member><function>php_sapi_name</function></member>
+ <member><function>phpinfo</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
+-->
Property changes on: phpdoc/es/trunk/reference/info/functions/php-uname.xml
___________________________________________________________________
Added: svn:keywords
+ Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL
Added: svn:eol-style
+ native