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
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.
Link to comment
Share on other sites

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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.