Fixed bug #51157 (The "recursive" parameter for mkdir is not documented.)

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@295712 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Kalle Sommer Nielsen 2010-03-02 01:50:22 +00:00
parent d042351dd7
commit fece0b4dcb

View file

@ -57,7 +57,8 @@
<term><parameter>recursive</parameter></term>
<listitem>
<para>
Default to &false;.
Allows the creation of nested directories specified in the
<parameter>pathname</parameter>. Defaults to &false;.
</para>
</listitem>
</varlistentry>
@ -127,6 +128,30 @@
<?php
mkdir("/path/to/my/dir", 0700);
?>
]]>
</programlisting>
</example>
</para>
<para>
<example>
<title><function>mkdir</function> using the <parameter>recursive</parameter> parameter</title>
<programlisting role="php">
<![CDATA[
<?php
/* Desired folder structure */
$structure = './depth1/depth2/depth3/';
/* To create the nested structure, the $recursive parameter
* to mkdir() must be specified.
*/
if(!mkdir($structure, 0, true))
{
die('Failed to create folders...');
}
/* ... */
?>
]]>
</programlisting>
</example>