zhahaman2001 Posted January 18, 2007 Share Posted January 18, 2007 heres my upload code code on page for form:[code]<form method='post' name='frmsub' action='upload.php'> <input type='file' name='picture'> <input type='file' name='video'> <input type='submit' value='Upload'></form>[/code]upload code:[code]$tobeid = 9;$pic_ext = substr($HTTP_POST_FILES['picture']['name'],-4);$pic_link = "media/incidents/pics/{$tobeid}{$pic_ext}";if (move_uploaded_file($HTTP_POST_FILES['picture']['tmp_name'], $pic_link)) {} else{print "error";} $vid_ext = substr($HTTP_POST_FILES['video']['name'],-4);$vid_link = "media/incidents/video/{$tobeid}{$vid_ext}";if (move_uploaded_file($HTTP_POST_FILES['video']['tmp_name'], $vid_link)) {} else{print "error";} [/code]ok so it upload the pic its fine (i have more code that error handles the pic but nothing that would interfer with the video) and it uploads the video it uploads the right size and everything but if you try to run the avi video with windows media player it gets an error and wont run....any ideas Link to comment https://forums.phpfreaks.com/topic/34750-uploading-an-avi-to-server-gets-an-error/ Share on other sites More sharing options...
blear Posted January 18, 2007 Share Posted January 18, 2007 Windows Media Player doesnt play avi files by default. You'll need Quicktime or RealPlayer to view them. Link to comment https://forums.phpfreaks.com/topic/34750-uploading-an-avi-to-server-gets-an-error/#findComment-163789 Share on other sites More sharing options...
zhahaman2001 Posted January 18, 2007 Author Share Posted January 18, 2007 i have all the codecs i need to play it .... it plays on my computer befor i upload it but after i upload it, it gets an error Link to comment https://forums.phpfreaks.com/topic/34750-uploading-an-avi-to-server-gets-an-error/#findComment-163859 Share on other sites More sharing options...
zhahaman2001 Posted January 18, 2007 Author Share Posted January 18, 2007 is it because im uploading a image and a video at the same time? Link to comment https://forums.phpfreaks.com/topic/34750-uploading-an-avi-to-server-gets-an-error/#findComment-163871 Share on other sites More sharing options...
The Little Guy Posted January 18, 2007 Share Posted January 18, 2007 could it be because the avi file is too large? Link to comment https://forums.phpfreaks.com/topic/34750-uploading-an-avi-to-server-gets-an-error/#findComment-163873 Share on other sites More sharing options...
zhahaman2001 Posted January 18, 2007 Author Share Posted January 18, 2007 no its only 4.87mb ..... and its 4.87 mb befor i upload and after i upload Link to comment https://forums.phpfreaks.com/topic/34750-uploading-an-avi-to-server-gets-an-error/#findComment-163875 Share on other sites More sharing options...
The Little Guy Posted January 18, 2007 Share Posted January 18, 2007 Try using this html for playing it:<img dynsrc="video.avi" /> Link to comment https://forums.phpfreaks.com/topic/34750-uploading-an-avi-to-server-gets-an-error/#findComment-163883 Share on other sites More sharing options...
The Little Guy Posted January 18, 2007 Share Posted January 18, 2007 I just realized that the above I gave you is IE only, look at this:http://www.w3schools.com/media/media_browservideos.asp Link to comment https://forums.phpfreaks.com/topic/34750-uploading-an-avi-to-server-gets-an-error/#findComment-163889 Share on other sites More sharing options...
zhahaman2001 Posted January 18, 2007 Author Share Posted January 18, 2007 for right now testing im running the server from my pc so when i upload this file its takeing the avi from my desktop and puting it in the server folder.... if i run the avi on my desktop it plays fine but after i have uploaded and i go to the server folder and play it, it has an error so it has to be something with the way i upload it Link to comment https://forums.phpfreaks.com/topic/34750-uploading-an-avi-to-server-gets-an-error/#findComment-163897 Share on other sites More sharing options...
The Little Guy Posted January 18, 2007 Share Posted January 18, 2007 can you play it from the server like you would play a normal video? (double clicking on the file) if you can than it uploaded fine Link to comment https://forums.phpfreaks.com/topic/34750-uploading-an-avi-to-server-gets-an-error/#findComment-163905 Share on other sites More sharing options...
zhahaman2001 Posted January 18, 2007 Author Share Posted January 18, 2007 no when i click it in windows it gets an error Link to comment https://forums.phpfreaks.com/topic/34750-uploading-an-avi-to-server-gets-an-error/#findComment-163908 Share on other sites More sharing options...
The Little Guy Posted January 18, 2007 Share Posted January 18, 2007 You might want to try to re-program your code...try using this tutorial, and see if you get any different results:http://www.tizag.com/phpT/fileupload.php Link to comment https://forums.phpfreaks.com/topic/34750-uploading-an-avi-to-server-gets-an-error/#findComment-164015 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.