mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
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:
parent
d042351dd7
commit
fece0b4dcb
1 changed files with 26 additions and 1 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue