0
我一直強調在這個愚蠢的腳本一個小時,我正試圖讓它上傳一個MP3 文件到它創建的文件夾。PHP上傳文件
它把信息到MySQL,使該文件夾卜當我的FTP文件夾是空的,沒有音樂文件中有
這裏是腳本感謝這麼這麼這麼多!
BTW $ name是張貼的名稱和全名是貼名稱+」 .MP3"
// BEGIN ENTERING INFORMATION TO MYSQL TABLE
$sql = mysql_query("INSERT INTO mattyc (name, date, length, size, link)
VALUES('$name','$date','$length','$size','$link')"
) or die (mysql_error());
mkdir("../music/albums/donjuma/$name", 0777);
$song = ("../music/albums/donjuma/$name/$fullname");
if (file_exists($song)) {
unlink($song);
}
$newname = "$fullname";
$newfile = rename(($_FILES['song']['tmp_name']),($newname));
$place_file = move_uploaded_file($newfile, "../music/albums/donjuma/$name/"."$newname");
$success_msg = "<font color=\"#009900\">Your SONG has been updated, it may take a few minutes for the changes to show... please be patient.</font>";
echo $success_msg;
}
}
}
它的人喜歡你,使這個網站值得訪問。感謝它的工作。 – DonJuma 2010-10-12 20:36:28