0

为什么我会收到此警告?

警告:move_uploaded_file(../documentos/games/banner.jpg):无法打开流:第 11 行的 C:\xampp\htdocs\admin\gameimage.php 中没有这样的文件或目录

警告:move_uploaded_file(): Unable to move 'C:\xampp\tmp\php5AD3.tmp' to '../documentos/games/banner.jpg' in C:\xampp\htdocs\admin\gameimage.php on line 11

代码是:

<?php if ((isset($_POST["enviado"])) && ($_POST["enviado"]=="form1")) { 
  $nome_arquivo = $_FILES['userfile']['name'];
  move_uploaded_file($_FILES['userfile']['tmp_name'], "../documentos/games/".$nome_arquivo);
?>
  
<script>
  opener.document.fomr1.strImage.value = "<?php echo $nome_arquivo;?>";
  self.close();
</script>
 
<?php 
  } else {
?>
  
<form action="gameimage.php" method="post" enctype="multipart/form-data" id="form1">
  <p>
    <input name="userfile" type="file" />
  </p>
  <p>
    <input type="submit" name="button" id="button" value="Upload Imagem" />
  </p>
  <input type="hidden" name="enviado" value="form1" />
</form>
    
<?php }?>
4

0 回答 0