svn_import

(PECL svn >= 0.2.0)

svn_importImports an unversioned path into a repository

說(shuō)明

svn_import(string $path, string $url, bool $nonrecursive): bool

Commits unversioned path into repository at url. If path is a directory and nonrecursive is false, the directory will be imported recursively.

參數(shù)

path

Path of file or directory to import.

注意: 相對(duì)路徑將會(huì)以PHP執(zhí)行文件所在目錄作為當(dāng)前工作目錄進(jìn)行解析。如果希望依據(jù)腳本所在目錄解析, 使用realpath() 或 dirname(__FILE__)。

url

Repository URL to import into.

nonrecursive

Whether or not to refrain from recursively processing directories.

返回值

成功時(shí)返回 true, 或者在失敗時(shí)返回 false。

范例

示例 #1 Basic example

This example demonstrates a basic use-case of this function. To import a directory named new-files into the repository at http://www.example.com/svnroot/incoming/abc, use:

<?php
svn_import
(realpath('new-files'), 'http://www.example.com/svnroot/incoming/abc'false);
?>

注釋

警告

此函數(shù)是實(shí)驗(yàn)性的。此函數(shù)的表象,包括名稱及其相關(guān)文檔都可能在未來(lái)的 PHP 發(fā)布版本中未通知就被修改。使用本函數(shù)風(fēng)險(xiǎn)自擔(dān)。

參見(jiàn)