我的一個form表單上傳文件,可以用echo 上傳的路徑,$_FILES['userfile']['name'] 得到任何的值。菜虫,请大家指点。
解决方案 »
- php 中文->??
- 我安装了Apache HTTP Server,但安装php时找不到相应的web server
- 请问大家php里对mysql操作完以后,需要关闭数据库吗??
- 多浏览器进程间 共享cookie的问题.
- 关于array_flip():Can only flip STRING and INTEGER的问题 -在线等
- cookie才能设置20个?太少了,如何能做到象session一样,存上万个也没问题的
- 有没有edong代理的?
- 使用checkbox更新数据表中的字段,急,在线等!!!!!!!!!!!
- php与access数据库的联结问题
- 高分求一SQL:请问怎么用select选取记录?顶者有分
- mysql 索引问题
- jquery+ajax+PHP表单验正
form中加一个type是file的input就可以了.input的名字叫userfile
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<body>
<?
/*if(!is_numeric($_POST[etprice]))
{
echo("<script> alert('市場價一定要是數字!' ); history.back();</script>");
}
if(!is_numeric($_POST[memberprice]))
{
echo("<script> alert('會員價只能是數字!');history.back();</script>");
}
$gname = $_POST[gname];*/
$year = $_POST[year];
$month = $_POST[month];
$date = $_POST[date];
$etprice = $_POST[etprice];
$memberprice = $_POST[memberprice];
$gtype = $_POST[typename];
$cate = $_POST[cate];
$brand = $_POST[brand];
$goodstype = $_POST[goodstype];
$recomend = $_POST[recomend];
$resum = $_POST[resum];
$uploadfile = $_POST[uploadfile];
echo($uploadfile);
echo($_FILES['userfile']['name'] ); ?>
</body>
</html>
有值,但是 echo($_FILES['userfile']['name'] );
没有值。奇怪。