|
xdiff_file_patch(PECL xdiff >= 0.2.0) xdiff_file_patch — Patch a file with an unified diff Описание
mixed xdiff_file_patch
( string $file
, string $patch
, string $dest
[, int $flags = DIFF_PATCH_NORMAL
] )
Patches a file with a patch and stores the result in a file. patch has to be an unified diff created by xdiff_file_diff()/xdiff_string_diff() function. An optional flags parameter specifies mode of operation. Список параметров
Возвращаемые значенияReturns FALSE if an internal error happened, string with rejected chunks if patch couldn't be applied or TRUE if patch has been successfully applied. Примеры
Пример #1 xdiff_file_patch() example The following code applies unified diff to a file.
<?php Пример #2 Patch reversing example The following code reverses a patch.
<?php |
|