上传图片时,发出警告,而且没有上传图片。
<br />
<br />
$upload_dir = "?user_img"; <br />
move_uploaded_file($_FILES["logo_file1"]["tmp_name"],$upload_dir."/".$_FILES["logo_file1"]["name"]);<br />
<br />
这是上传图片的代码,这个代码,为什么总是出现警告?
这个代码的文件在根目录的,_test目录里面。
而且根目录里的user_img里面没有图片。
_test\user_img里面也没有图片 ,
我是想把图片上传到根目录里的user_img里面。
Warning: move_uploaded_file(?user_img/r6s2g3.gif) [function.move-uploaded-file]: failed to open stream: No such file or directory in /home/hosting_users/kr_mall24/www/_test/post_ok.php on line 53
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpxJHvyD' to '?user_img/r6s2g3.gif' in /home/hosting_users/kr_mall24/www/_test/post_ok.php on line 53
------解决方案--------------------没有这个文件 看看是不是路径错了
------解决方案--------------------$upload_dir = "/www?user_img";
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn