svn: /phpdoc/es/trunk/reference/ datetime/datetime/construct.xml filesystem/functions/mkdir.xml

From: Date: Mon, 08 Mar 2010 16:59:40 +0000
Subject: svn: /phpdoc/es/trunk/reference/ datetime/datetime/construct.xml filesystem/functions/mkdir.xml
Groups: php.doc.es 
Request: Send a blank email to doc-es+get-2207@lists.php.net to get a copy of this message
seros Mon, 08 Mar 2010 16:59:40 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=295970 Log: Actualización Changed paths: U phpdoc/es/trunk/reference/datetime/datetime/construct.xml U phpdoc/es/trunk/reference/filesystem/functions/mkdir.xml Modified: phpdoc/es/trunk/reference/datetime/datetime/construct.xml =================================================================== --- phpdoc/es/trunk/reference/datetime/datetime/construct.xml 2010-03-08 16:08:24 UTC (rev 295969) +++ phpdoc/es/trunk/reference/datetime/datetime/construct.xml 2010-03-08 16:59:40 UTC (rev 295970) @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 291313 $ --> -<!-- EN-Revision: 291313 Maintainer: seros Status: ready --> +<!-- $Revision: 295819 $ --> +<!-- EN-Revision: 295819 Maintainer: seros Status: ready --> <refentry xml:id="datetime.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <refnamediv> <refname>DateTime::__construct</refname> <refpurpose>Devuelve un nuevo objeto DateTime</refpurpose> </refnamediv> - + <refsect1 role="description"> &reftitle.description; <methodsynopsis> @@ -19,7 +19,7 @@ Devuelve un nuevo objeto DateTime. </para> </refsect1> - + <refsect1 role="parameters"> &reftitle.parameters; <para> @@ -43,14 +43,14 @@ </variablelist> </para> </refsect1> - + <refsect1 role="errors"> &reftitle.errors; <para> Emite <classname>Exception</classname> en caso de error. </para> </refsect1> - + <refsect1 role="examples"> &reftitle.examples; <para> @@ -67,9 +67,25 @@ ]]> </programlisting> </example> + + <example> + <title>Crear un objeto <classname>DateTime</classname> desde una marca de tiempo UNIX</title> + <para> + Para crear un objeto <classname>DateTime</classname> desde una marca de tiempo UNIX + use la palabra clave <literal>@</literal> con <function>strtotime</function>. + </para> + <programlisting role="php"> +<![CDATA[ +<?php +$timestamp = $_SERVER["REQUEST_TIME"]; +$dt = new DateTime("@$timestamp"); +?> +]]> + </programlisting> + </example> </para> </refsect1> - + </refentry> <!-- Keep this comment at the end of the file Modified: phpdoc/es/trunk/reference/filesystem/functions/mkdir.xml =================================================================== --- phpdoc/es/trunk/reference/filesystem/functions/mkdir.xml 2010-03-08 16:08:24 UTC (rev 295969) +++ phpdoc/es/trunk/reference/filesystem/functions/mkdir.xml 2010-03-08 16:59:40 UTC (rev 295970) @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 288721 $ --> -<!-- EN-Revision: 288721 Maintainer: seros Status: ready --> +<!-- $Revision: 295712 $ --> +<!-- EN-Revision: 295712 Maintainer: seros Status: ready --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.mkdir"> <refnamediv> <refname>mkdir</refname> @@ -58,7 +58,8 @@ <term><parameter>recursive</parameter></term> <listitem> <para> - Por defecto a &false;. + Permite la creación de directorios anidados especificado en el + parámetro <parameter>pathname</parameter>. Por defecto a &false;. </para> </listitem> </varlistentry> @@ -132,6 +133,30 @@ </programlisting> </example> </para> + <para> + <example> + <title><function>mkdir</function> usando el parámetro <parameter>recursive</parameter></title> + <programlisting role="php"> +<![CDATA[ +<?php +/* Estructura de carpeta deseada */ +$estructura = './depth1/depth2/depth3/'; + +/* Para crear una estructura anidada se debe especificar el parámetro $recursive + * en mkdir(). + */ + +if(!mkdir($estructura, 0, true)) +{ + die('Fallo al crear carpetas...'); +} + +/* ... */ +?> +]]> + </programlisting> + </example> + </para> </refsect1> <refsect1 role="notes">

« previous php.doc.es (#2207) next »