Soul_Stealler
Registered
Искам да копирам файловете от една папка в друга, но засега го правя файл по файл, но нещо не става....
Как би изглеждал скрипт, който копира файловете от папка default в папка с име $user - какъвто е регвания юзер
Код:
$stara_p = "building1.php";
$stara_p1 = "building1.dat";
$stara_p2 = "building2.php";
$stara_p3 = "building2.dat";
$stara_p4 = "building3.php";
$stara_p5 = "building3.dat";
$stara_p6 = "prou1.php";
$stara_p7 = "prou1.dat";
$stara_p8 = "home.php";
/////////
$nova_p = "$user/building1.php";
$nova_p1 = "$user/building1.dat";
$nova_p2 = "$user/building2.php";
$nova_p3 = "$user/building2.dat";
$nova_p4 = "$user/building3.php";
$nova_p5 = "$user/building3.dat";
$nova_p6 = "$user/prou1.php";
$nova_p7 = "$user/prou1.dat";
$nova_p8 = "$user/home.php";
if ( copy($stara_p, $nova_p) and copy($stara_p1, $nova_p1) and copy($stara_p2, $nova_p2) and copy($stara_p3, $nova_p3) and copy($stara_p4, $nova_p4) and copy($stara_p5, $nova_p5) and copy($stara_p6, $nova_p6) and copy($stara_p7, $nova_p7) and copy($stara_p8, $nova_p8)){
echo '
<font color=#ff0000>
РЕГИСТРАЦИЯТА Е УСПЕШНА!<br>
<font color="#ff0000">
МОЛЯ, ИЗЧАКАЙТЕ......
<META HTTP-EQUIV="Refresh"
CONTENT="3; URL=login.html">';
} else "Станала е грешка, моля регистрирайте се наново!";