Ben windows kullanıyorum, MySQL DB, PHP
I am building the Joomla Component whose one of the functionality is to synchronize the folders I want to sync two folders of different name.. How can I do this? It has to be dne in the same machine, no two different servers are involved in it..
PHP iki klasörleri senkronize etmek için nasıl?
UPDATED
Alex Cevap Bağlamında IN
What if i am editing any .jpg file in one folder and saving it with same name as it has, also this file is already present in other folder. And I want this edited pic to be transfered to the other folder.? Ayrıca ben karşılaştırılmak üzere yapılandırılmış Joomla'nın iç içe dosyası var
UPDATE 2
Ben u sadece içeri ur çözüm CONCAT için kullanabilirsiniz eğer çıktısı bana klasörün tam yapısı ... tekrarlamalı bir fonksiyon var ..
<?
function getDirectory($path = '.', $ignore = '') {
$dirTree = array ();
$dirTreeTemp = array ();
$ignore[] = '.';
$ignore[] = '..';
$dh = @opendir($path);
while (false !== ($file = readdir($dh))) {
if (!in_array($file, $ignore)) {
if (!is_dir("$path/$file")) {
$stat = stat("$path/$file");
$statdir = stat("$path");
$dirTree["$path"][] = $file. " === ". date('Y-m-d H:i:s', $stat['mtime']) . " Directory == ".$path."===". date('Y-m-d H:i:s', $statdir['mtime']) ;
} else {
$dirTreeTemp = getDirectory("$path/$file", $ignore);
if (is_array($dirTreeTemp))$dirTree = array_merge($dirTree, $dirTreeTemp);
}
}
}
closedir($dh);
return $dirTree;
}
$ignore = array('.htaccess', 'error_log', 'cgi-bin', 'php.ini', '.ftpquota');
$dirTree = getDirectory('.', $ignore);
?>
<pre>
<?
print_r($dirTree);
?>
</pre>