问题如下:
在本机测试,Copy和getimagesize一切正常
网络中(局域网,使用本机服务器)报告错误:
Warning: getimagesize: Unable to open 'E:\\Apache\\htdocs\\image\\yellow\\IMAGE1-5.jpg' for reading. in /usr/local/apache/htdocs/bbs/sub_form/uploadfile.php on line 6
Warning: Unable to open 'E:\\Apache\\htdocs\\image\\yellow\\IMAGE1-5.jpg' for reading: No such file or directory in /usr/local/apache/htdocs/bbs/sub_form/uploadfile.php on line 13
网络服务器一样的错误。
另:是否路径中含空格和其他字符,就不能找到文件?
谢谢,在线等待回复
---------------------------------------------------------------
1<form action="next.php" enctype="multipart/form-data" method="post">
2上传文件必须加enctype="multipart/form-data";
3===============================================
4另:上传的文件变量最好用下面的数组.因为在PHP4.3..后register_globals的默认值为Off
5
6$_FILES['userfile']['name']
7客户端机器文件的原名称。
8
9$_FILES['userfile']['type']
10文件的 MIME 类型,需要浏览器提供该信息的支持,例如“image/gif”。
11
12$_FILES['userfile']['size']
13已上传文件的大小,单位为字节。
14
15$_FILES['userfile']['tmp_name']
16文件被上传后在服务端储存的临时文件名。
17
18$_FILES['userfile']['error']
19和该文件上传相关的错误代码。['error'] 是在 PHP 4.2.0 版本中增加的。</form>