问答详情
源自:1-3 $_FILES预定义变量解析

无法移动文件

<?php

//$_FILE; 文件上传变量

print_r($_FILES);

$filename=$_FILES['myFile']['name'];

$type=$_FILES['myFile']['type'];

$tmp_name= $_FILES['myFile']['tmp_name'];

$size= $_FILES['myFile']['size'];

$error = $_FILES['myFile']['error'];

move_uploaded_file($tmp_name,"E:/wamp/www/updown/".$filename);?>

提示Warning: move_uploaded_file(E:/wamp/www/updown/免冠照1.jpg): failed to open stream: Invalid argument in E:\wamp\www\updown\doAction.php on line 10

 Warning: move_uploaded_file(): Unable to move 'E:\wamp\tmp\php7118.tmp' to 'E:/wamp/www/updown/免冠照1.jpg'

求教

提问者:天雨潇潇 2018-01-02 10:12

个回答

  • 锃明瓦亮
    2018-01-07 22:52:20
    已采纳

    move_uploaded_file($tmp_name,"updown/".$filename);