是啊,我的问题一摸一样,licher同病相连哦,程序肯定没有错,问题是为什么在 "问题当'file'浏览一个文件时,现上传就出错,而试着直接从程序中确定文件,则能正确上传。" 我出现的是"Warning: Unable to open 'C:\\WINDOWS\\TEMP\\php9' for reading: No such file or directory in D:\内部网络\upimage.php on line 26" 好像是我的临时虚拟存储目录不存在似目录.
现在又出新问题了:Warning: Unable to open 'C:\\WINDOWS\\TEMP\\php2' for reading: No such file or directory in E:\home\avirtor\virtualhost\virtualhost\uploadfile.php on line 14
现在又出新问题了:Warning: Unable to open 'C:\\WINDOWS\\TEMP\\php2' for reading: No such file or directory in E:\home\avirtor\virtualhost\virtualhost\uploadfile.php on line 14
现在又出新问题了:Warning: Unable to open 'C:\\WINDOWS\\TEMP\\php2' for reading: No such file or directory in E:\home\testftp\upload.php on line 6
好像还是原来的错误!是不是源代码是不是有错误?我想应该没有问题!
如果解决不了,骂我好了!
默认的是系统的临时目录,
到windows\temp里找找!
(你仅仅允许上传不到2k的文件!!!以下是2M)
还有看看php.ini中的上载文件大小的限制。
<input type="hidden" name="MAX_FILE_SIZE" value="2097152">
问题可能是表单域中的<input name="userfile" type="file">,当'file'浏览一个文件
时,现上传就出错,而试着直接从程序中确定文件,则能正确上传。这是什么原因呢?
^^^^这里少了一个双引号
"问题当'file'浏览一个文件时,现上传就出错,而试着直接从程序中确定文件,则能正确上传。"
我出现的是"Warning: Unable to open 'C:\\WINDOWS\\TEMP\\php9' for reading: No such file or directory in D:\内部网络\upimage.php on line 26"
好像是我的临时虚拟存储目录不存在似目录.
<input type="file" name="picurl" size="15" accept="image/x-png,image/gif,image/jpeg">
我在程序里echo "$picur1";发现显示的是C:\\WINDOWS\\TEMP\\php9
是不是这个原因导致的.这么解决.