Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 17149 программистов и 1834 робота. Сейчас ищет 1671 программист ...

Net_FTP::mkdir()

Вернуться к: Net_FTP

Net_FTP::mkdir()

Net_FTP::mkdir() – creates a new directory.

Synopsis

require_once 'Net/FTP.php';

mixed Net_FTP::mkdir ( string $directory , bool $recursive = false )

Creates a new directory on the FTP server. You can give this function either a relative or an absolute path as the first parameter. The second (optional) parameter lets you create directories recursively (meaning you can create './my/new/dir' even if '/my' doesn't exist. All 3 directories would be created ).

Parameter

  • string $directory - The directory you want to create. This can either be an absolute path (e.g. '/home/mydir') or a relative one (e.g. 'mydir').

Return value

mixed - true on success, otherwise PEAR::Error.

Throws

The returned PEAR_Error object in case of an error is specific. There is only one errornumber which may occur. The message given by this error will contain the directory where the error occurred in "Creation of '$dir' failed". operation fails.

Note

This function can not be called statically.

Example

Using mkdir()

<?php

  $test
->mkdir('../mydir');

?>


Вернуться к: Net_FTP

© 2024 «PHP.RU — Сообщество PHP-Программистов»
Главная | Форум | Реклама на сайте | Контакты VIP Сувениры
Разработка компании ODware