da tut sich garnichts. Was habe ich da falsch gemacht?
PHP-Code:
if ($_FILES['musicfile']['tmp_name']) {
switch (true) {
case ($_FILES):
$my_data = $_FILES;
break;
case ($HTTP_POST_FILES):
$my_data = $HTTP_POST_FILES;
break;
}
$uploadpfad = "artists/";
$ftpuploadpfad = "/www/projekte/moodpack/";
$dateiname = $my_data['musicfile']['name'];
$ftp_host = "sodah.de";
$ftp_user = "lalala";
$ftp_password = "lalalala";
$conn = ftp_connect($ftp_host);
$login = ftp_login($conn, $ftp_user, $ftp_password);
$mode = ftp_pasv($conn, TRUE);
ftp_put($conn, $my_data['musicfile']['tmp_name'], $ftpuploadpfad.$uploadpfad.$my_data['musicfile']['name'], FTP_BINARY);
//move_uploaded_file($my_data['musicfile']['tmp_name'],$uploadpfad.$my_data['musicfile']['name']);
if (file_exists("$uploadpfad$dateiname")) {
echo '<script type="text/javascript">
parent.oben.document.flashfilm.SetVariable("musicfile","'.$dateiname.'");
window.location="upload.htm";
</script>';
}
}
ftp_close($conn);
Kommentar