Jump to content

mp3 upload problem


thewooleymammoth

Recommended Posts

my i want to upload mp3 files but cannot upload any larger ones i can upload a mp3 thats 300kb no problem but when i try to upload a 4 or 5 mb i get these results

 

DonAlder_DRDR.mp3== name
==type
0==size
==tmp_name

 

here is the code,

 

<?php
$n='name';
if (isset($_POST['submit']))
{
      echo $_FILES['s']['name']."== name<BR>".$_FILES['s']['type']."==type<BR>".$_FILES['s']['size']."==size<BR>".$_FILES["s"]["tmp_name"]."==tmp_name<BR>";
if ($_FILES['s']['name'] != "") {
   if (1==1) {
      if ($_FILES["s"]["size"] < 2097152) {
         move_uploaded_file($_FILES["s"]["tmp_name"], "songs/" . "$n.mp3");
         echo "File has been stored in your uploads directory.";}
      else { echo "Please upload a file that is under 2 mb!";}
   } else {
echo "Please upload a mp3 file!";
exit;}
} else { echo "Please enter a file.";}

}

?>
<form method='post' action ='' enctype="multipart/form-data">
<input type='file' name='s'> <BR>
<input type='submit' name='submit'>
</form>

ive already changed the php.ini in C:\wamp\bin\php\php5.2.6\php.ini to set the upload limit to twenty mb so there shouldnt be a problem with that. anyone have any idea why it is not uploading?

 

here is the output with the smaller file

 

b-b-1.mp3== name
application/octet-stream==type
193962==size
C:\wamp\tmp\php87.tmp==tmp_name

 

 

Link to comment
https://forums.phpfreaks.com/topic/132386-mp3-upload-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.