Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Working on a website.
#18
Alright, I've gotten a move_uploaded_file error.

Error:
Output Wrote:Warning: move_uploaded_file(/www/99k.org/k/e/y/keybored/htdocs/admin/upload/Basic Newsiggy.PNG) [function.move-uploaded-file]: failed to open stream: Permission denied in /www/99k.org/k/e/y/keybored/htdocs/admin/image_upload_file.php on line 30

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/www/99k.org/k/e/y/keybored/htdocs/php5NdN5P' to '/www/99k.org/k/e/y/keybored/htdocs/admin/upload/Basic Newsiggy.PNG' in /www/99k.org/k/e/y/keybored/htdocs/admin/image_upload_file.php on line 30

Code:
Code:
<?php
if (((strchr($_FILES["file"]["type"],"image/")))
&& ($_FILES["file"]["size"] < 200000))
  {
   if ($_FILES["file"]["error"] > 0)
     {
     echo "Return Code: " . $_FILES["file"]["error"] . "<br />";
     }
   else
     {
     echo "Upload: " . $_FILES["file"]["name"] . "<br />";
     echo "Type: " . $_FILES["file"]["type"] . "<br />";
     echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
     echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br />";

    if (file_exists("upload/" . $_FILES["file"]["name"]))
       {
       echo $_FILES["file"]["name"] . " already exists. ";
       }
     else
       {
       move_uploaded_file($_FILES["file"]["tmp_name"],
       "upload/" . $_FILES["file"]["name"]);     /*Line30
       echo "Stored in: " . "admin/upload/" . $_FILES["file"]["name"];
       }
     }
   }
else
   {
   echo "Invalid file; file type was " . $_FILES["file"]["type"];
   }
?>
Reply


Messages In This Thread
Working on a website. - by Qwertygiy - 07-18-2011, 08:56 PM

Forum Jump:


Users browsing this thread: 4 Guest(s)