SKID: jestli nechce presouvat vsechno, napriklad adresare ktery se nemeni, tak ja sem si napsal tenhle script, kde si nadefinujes ktery adresare chces presunout, pak je to otazka jednoho kliknuti - ja presouvam jenom obrazky, zbytek se deje v databazi (taky dump scriptem a pak import scriptem, pac pouzivam dve db (dev a master)):
PRO FTP
<?php
$images ='/homepages/16/d230752861/htdocs/dev/images';
$media ='/homepages/16/d230752861/htdocs/dev/media';
$devimages ='/homepages/16/d230752861/htdocs/images';
$devmedia ='/homepages/16/d230752861/htdocs/media';
recurse_copy($images, $devimages);
recurse_copy($media, $devmedia);
function recurse_copy($src,$dst) {
$dir = opendir($src);
@mkdir($dst);
while(false !== ( $file = readdir($dir)) ) {
if (( $file != '.' ) && ( $file != '..' )) {
if ( is_dir($src . '/' . $file) ) {
recurse_copy($src . '/' . $file,$dst . '/' . $file);
}
else {
copy($src . '/' . $file,$dst . '/' . $file);
}
}
}
closedir($dir);
}
echo "<br><br><b>100% done</b>";
?>