<form enctype="multipart/form-data" action="upload.php" method="POST">
<!-- MAX_FILE_SIZE must precede the file input field -->
<input type="hidden" name="MAX_FILE_SIZE" value="100000000" />
<!-- Name of input element determines name in $_FILES array -->
Send this file: <input name="userfile" type="file" />
<input type="submit" value="Send File" />
</form>
后台:
复制代码 代码如下:
<?php
$uploaddir = './video/';
foreach($_FILES as $upfile)
{
$uploadfile = $uploaddir.$upfile['name'];