New here, and new to PHP. Im a flash developer, and a client wants to be able to upload mp3's thru his flash...
I had this script working before, but I tried to add a rename function to put the users name before the track, and since then I can't get it to work at all..
Code: Select all
<?php
//create the directory if doesn't exists (should have write permissons)
if(!is_dir("./files")) mkdir("./files", 0755);
//move the uploaded file
move_uploaded_file($_FILES['Filedata']['tmp_name'], "files/".$_FILES['Filedata']['name']);
//rename("files/".$_FILES['Filedata']['name'], "files/".$_GET['name']."_".$_FILES['Filedata']['name']);
chmod("files/".$_FILES['Filedata']['name'], 0777);
?>Thanks so much!