我正试图打上图像的纸面,但笔记本(照片)是空洞的。
$_FILES[ photo ][ name ];
$_FILES[ photo ][ size ];
$_FILES[ photo ][ type ];
$_FILES[ photo ][ tmp_name ];
$_FILES[ photo ][ error ];
当我回头来时,他们都绝对没有回去。
if($_FILES[ photo ][ name ])
{
if(!$_FILES[ photo ][ error ])
{
$new_file_name = strtolower($_FILES[ photo ][ name ]);
if($_FILES[ photo ][ size ] > (1024000))
{
$valid_file = false;
$msg = Oops! Your file s size is to large. ;
echo $msg;
}
if($valid_file)
{
move_uploaded_file($_FILES[ photo ][ tmp_name ], images/thumbnails/ .$new_file_name);
$msg = Congratulations! Your file was accepted. ;
echo $msg;
}
}
else
{
$msg = Ooops! Your upload triggered the following error: .$_FILES[ photo ][ error ];
echo $msg;
}
}
我是否犯过错?
<form action= ?p=post method= POST >
<input type= file name= photo size= 25 />
<input type= submit value= Posten name= submit /><br />
</form>