Jump to content


Photo

PHP file handling help me!


  • Please log in to reply
2 replies to this topic

#1 faani

faani
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 09 October 2006 - 07:45 AM

$uploaddir = "/".$countryList."/";
echo ($uploaddir);
$file_name = "uploadfile";
function file_upload( $file_name, $uploaddir){

$uploadfile =  $uploaddir . $_FILES[$file_name]['name'];
if (@move_uploaded_file( $_FILES[ $file_name ]['tmp_name'], $uploadfile)) {

} else
{
echo( $_FILES[ $file_name ]['name'] . " Does not uploaded successfully:\n");
}
}

#2 xsist10

xsist10
  • Members
  • PipPipPip
  • Advanced Member
  • 114 posts

Posted 09 October 2006 - 07:59 AM

Ok... calm down and don't panic.

I'll need a little more information.
Is there an error message to go with this?
Are you running in windows / solaris / linux / etc?

You most probable problem is your first line:

$uploaddir = "/".$countryList."/";

try replacing it with:

$uploaddir = $countryList."/";

Alternatively check your permissions on the folder in question.
SA PHP Archives - www.phparchives.za.org

#3 tomfmason

tomfmason
  • Staff Alumni
  • Advanced Member
  • 1,696 posts
  • Locationstealing your wifi

Posted 09 October 2006 - 07:59 AM

Ok first, please do not post the same question twice. As it is against the posting rules. Please read the forum posting guid lines.. Now I think that you may want to have a look at this simple file upload tutorial

Good Luck,
Tom

Traveling East in search of instruction, and West to propagate the knowledge I have had gained.

current projects: pokersource

My Blog | My Pastebin | PHP Validation class | Backtrack linux





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users