svn_import

(PECL svn >= 0.2.0)

svn_importImports an unversioned path into a repository

說明

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

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

參數

path

Path of file or directory to import.

Note: 相對路徑將會以PHP執行檔案所在目錄作為目前工作目錄進行解析。如果希望依據腳本所在目錄解析, 使用realpath() 或 dirname(__FILE__)。

url

Repository URL to import into.

nonrecursive

Whether or not to refrain from recursively processing directories.

回傳值

如果成功則回傳 TRUE,失敗則回傳 FALSE

註釋

Warning

本函式是實驗性的。這個函式的行為、名稱、和關於此函式的任何其他文件在未來PHP的發行中可能會在不通知的情況下改變。 使用此函式需自行承擔風險。

範例

Example #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);
?>

參見

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top