xshanelarsonx Posted February 7, 2007 Share Posted February 7, 2007 This code will upload everything but MP3 files. <form action="Music_Upload.php" method="post" enctype="multipart/form-data"> File <input type="file" name="file" id="file" /> <input type="submit" name="submit" value="Upload" /> </form> <? $file_tmp = $_FILES['file']['tmp_name']; $fname = $_FILES['file']['name']; $fname = str_replace(' ', '_', $fname); move_uploaded_file($_FILES["file"]["tmp_name"],"Files/Music/" ."$fname" ); ?> Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 7, 2007 Share Posted February 7, 2007 Are you sure it's the file type, and not size that is the problem? Perhaps the files are too big. Quote Link to comment Share on other sites More sharing options...
xshanelarsonx Posted February 7, 2007 Author Share Posted February 7, 2007 I think thats it. How can I fix this? I can edit the php.ini file. Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 7, 2007 Share Posted February 7, 2007 Set the upload_max_filesize to something higher. Quote Link to comment Share on other sites More sharing options...
xshanelarsonx Posted February 7, 2007 Author Share Posted February 7, 2007 Thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.