Jump to content

mp3 upload


phorcon3

Recommended Posts

<?php

if(isset($_POST['post']))
{
move_uploaded_file($_FILES['mp3_file']['tmp_name'],$_SERVER['DOCUMENT_ROOT'].'/files/test.mp3');
}

echo '
<form method="post" action="/test.php" enctype="multipart/form-data">
<input type="hidden" name="post" value="" />
<input type="file" name="mp3_file" size="30" />
<input type="submit" value="Submit" />
</form>
';

?>

 

can someone please explain to me why this wouldnt upload the file?

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

ok, nevermind ...i had to change the upload_max_filesize in the php.ini file ...but how come this wouldnt work:

 

ini_set('upload_max_filesize','10M'); 

 

...because i had to go into the php.ini file and change it... ini_set didnt do it for some reason.. any ideas why?

Link to comment
https://forums.phpfreaks.com/topic/109779-mp3-upload/#findComment-563396
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.