如何上传视频文件?

如何上传视频文件?

<html>
<head>
  <title>Uploading...</title>
</head>
<body>
<h1>Uploading file...</h1>
<?php

  if ($_FILES['userfile']['error'] > 0)
  {
    echo 'Problem: ';
    switch ($_FILES['userfile']['error'])
    {
      case 1:  echo 'File exceeded upload_max_filesize';  break;
      case 2:  echo 'File exceeded max_file_size';  break;
      case 3:  echo 'File only partially uploaded';  break;
      case 4:  echo 'No file uploaded';  break;
    }
    exit;
  }

  // Does the file have the right MIME type?
  if ($_FILES['userfile']['type'] != 'text/plain')------>该怎么设置???想上传电影!
{
   echo 'Problem: file is not plain text';
   exit;
}

  // put the file where we'd like it
  $upfile = 'E:/upload/'.$_FILES['userfile']['name'];

  if (is_uploaded_file($_FILES['userfile']['tmp_name']))
  {
     if (!move_uploaded_file($_FILES['userfile']['tmp_name'],$upfile))
     {
        echo 'Problem: Could not move file to destination directory';
        exit;
     }
  }
  else
  {
    echo 'Problem: Possible file upload attack. Filename: ';
    echo $_FILES['userfile']['name'];
    exit;
  }


  echo 'File uploaded successfully<br><br>';

?>
</body>
</html>

干脆把它去掉就行了阿

[复制到剪切板]
CODE:
<html>
<
head>
  <
title>Uploading...</title>
</
head>
<
body>
<
h1>Uploading file...</h1>
<?
php

  
if ($_FILES['userfile']['error'] > 0)
  {
    echo 
'Problem: ';
    switch (
$_FILES['userfile']['error'])
    {
      case 
1:  echo 'File exceeded upload_max_filesize';  break;
      case 
2:  echo 'File exceeded max_file_size';  break;
      case 
3:  echo 'File only partially uploaded';  break;
      case 
4:  echo 'No file uploaded';  break;
    }
    exit;
  }

  
// Does the file have the right MIME type?
/*  
if ($_FILES['userfile']['type'] != 'text/plain')------>该怎么设置???想上传电影!
{
   echo 'Problem: file is not plain text';
   exit;
}
*/
  // put the file where we'd like it
  
$upfile 'E:/upload/'.$_FILES['userfile']['name'];

  if (
is_uploaded_file($_FILES['userfile']['tmp_name'])) 
  {
     if (!
move_uploaded_file($_FILES['userfile']['tmp_name'],$upfile))
     {
        echo 
'Problem: Could not move file to destination directory';
        exit;
     }
  } 
  else 
  {
    echo 
'Problem: Possible file upload attack. Filename: ';
    echo 
$_FILES['userfile']['name'];
    exit;
  }


  echo 
'File uploaded successfully<br><br>'

?>
</
body>
</
html> ;

毕业了。。。