index.php(用于图片上传的php脚本)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
<head>
<title>图片上传</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<form action="picture.php" method="post" enctype="multipart/form-data">
图片名称:<input type="text" name="name1" size="20"/></br>
上传图片:<input name="file1" type="file"></br>
图片名称:<input type="text" name="name2" size="20"/></br>
上传图片:<input name="file2" type="file"></br>
<input type="submit" name="submit" value="提交">
</form>
</body>
</html>
首先,创建一个表单用于图片上传。运行结果如下
网友评论