(PECL svn >= 0.2.0)
svn_import — Imports an unversioned path into a repository
Commits unversioned path into repository at url. If path is a directory and nonrecursive is FALSE, the directory will be imported recursively.
Path of file or directory to import.
Note: Relative paths will be resolved as if the current working directory was the one that contains the PHP binary. To use the calling script's working directory, use realpath() or dirname(__FILE__).
Repository URL to import into.
Whether or not to refrain from recursively processing directories.
成功时返回 TRUE, 或者在失败时返回 FALSE.
此函数是实验性的。 此函数的表象,包括名称及其相关文档都可能在未来的 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);
?>