Page 2 of 2

Posted: Sun Jun 25, 2006 8:12 pm
by franknu

Code: Select all

<?php
  $picture1=$_FILES['picture1']['tmp_name'];

  var_dump($_FILES);



  $upfile = "/httpdocs/images/".$picture1_name;

   print_r ($Picture1);

    if(!move_uploaded_file($picture1, $upfile))
    {
    echo "problem: wrong directory";

  exit;
    }



  echo "File uploaded successfully<br><br>";
  $fp = fopen($upfile, "r");

  fclose ($fp);


  $fp = fopen($upfile, "w");
  fwrite($fp);
  fclose($fp);

  echo "Preview of uploaded file contents:<br><hr>";

  echo "<br><hr>";

?>
now i am displaying this:

array(1) { ["picture1"]=> array(4) { ["name"]=> string(16) "icon_webmail.jpg" ["type"]=> string(11) "image/pjpeg" ["tmp_name"]=> string(4) "none" ["size"]=> int(0) } } problem: wrong directory