Jump to content

uploading an .avi to server gets an error


zhahaman2001

Recommended Posts

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

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

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.