Jump to content

PHP file handling help me!


faani

Recommended Posts

$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");
}
}
Link to comment
https://forums.phpfreaks.com/topic/23401-php-file-handling-help-me/
Share on other sites

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:

[code]$uploaddir = "/".$countryList."/";[/code]

try replacing it with:

[code]$uploaddir = $countryList."/";[/code]

Alternatively check your permissions on the folder in question.
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 [url=http://www.tizag.com/phpT/fileupload.php]file upload tutorial[/url]

Good Luck,
Tom

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.