我来翻译一下哈::
警告:不能读取'C:\\Documents and Settings\\Administrator\\My Documents\\My Pictures\\NGM1980_01p135.jpg'
不春在文件或者目录在/home/longjun/webroot/picture.php 的第十五行请大家指点
警告:不能读取'C:\\Documents and Settings\\Administrator\\My Documents\\My Pictures\\NGM1980_01p135.jpg'
不春在文件或者目录在/home/longjun/webroot/picture.php 的第十五行请大家指点
都在/home/longjun/webroot/images /home/longjun/webroot/picture.php
表示没有上传成功,请检查你的服务器是否支持上传
<?
$imagePath="./images/";
if($T1)
{
$dest=$imagePath.$uploadfile_name;
echo "$uploadfile_name<br>";
echo "$userfile<br>";
echo "$dest<br>";
if( move_uploaded_file($userfile,$dest)==false)
{
print "move_uploaded_file($userfile,$dest)";
}
else
{
echo "dsd";
}
//copy($userfile,$userfile_name);
//print "copy($userfile,$dest)";}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=??????">
<title>无标题文档</title>
</head><body>
<form method=post action="picture.php" enctype="mulipart/form-data"><table width="82%" border="1">
<tr>
<td><input type="file" name="userfile" >
<input type="submit" name="T1" value="上传"> </td>
</tr>
</table>
</form>
</body>
</html>move_uploaded_file($userfile,$dest)的值总是fasle
我看了php手册里面说如果第一个参数不正确的话 就会返回false 哪位大侠帮我看看代码!!
$imagePath="./images/";
if($Send)
{
if(move_uploaded_file($userfile,$imagePath.$userfile_name))
{
echo "ok";
}
else
{
echo "no";
}}
else
{
?><form enctype="multipart/form-data" action="upload.php" method="POST">
Send this file: <input name="userfile" type="file">
<input type="submit" name="Send">
</form>
<?php
}
?>测试通过了
我在服务器执行后