phorcon3 Posted June 11, 2008 Share Posted June 11, 2008 <?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 More sharing options...
MatthewJ Posted June 11, 2008 Share Posted June 11, 2008 Did you get an error? 99% of the time, permissions is the culprit Link to comment https://forums.phpfreaks.com/topic/109779-mp3-upload/#findComment-563357 Share on other sites More sharing options...
phorcon3 Posted June 11, 2008 Author Share Posted June 11, 2008 nope ..just wouldnt upload the file.. but i dont have to chmod the folder, right? cause im runnin this script on a localhost (winxp)... and it works fine with images, when i change the ext. from .mp3 to .jpg Link to comment https://forums.phpfreaks.com/topic/109779-mp3-upload/#findComment-563368 Share on other sites More sharing options...
phorcon3 Posted June 11, 2008 Author Share Posted June 11, 2008 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 More sharing options...
Darklink Posted June 11, 2008 Share Posted June 11, 2008 EDIT:::NeverMind::: Link to comment https://forums.phpfreaks.com/topic/109779-mp3-upload/#findComment-563526 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.