Re: [PHP] upload file problem
- From: php@xxxxxxx (brian)
- Date: Thu, 31 Jul 2008 13:05:24 -0400
Jignesh Thummar wrote:
I'm trying to upload the file. It's showing me successfully uploaded.
But it's not able to move from temp directory to my defined directory
my code:
if (is_uploaded_file($_FILES['myfile']['tmp_name'])) {
move_uploaded_file($_FILES['myfile']['tmp_name'], $myfilename);
echo "File ". $_FILES['myfile']['name'] ." uploaded successfully.\n";
} else {
echo "File uploading error";
}
What does $myfilename resolve to? It should include the complete path from server root (not DOCUMENT_ROOT).
Try:
echo "File uploading error: ${myfilename}";
.
- References:
- upload file problem
- From: "Jignesh Thummar"
- upload file problem
- Prev by Date: Re: [PHP] accessing variables within objects
- Next by Date: Re: [PHP] Get Remote-Image
- Previous by thread: Re: [PHP] upload file problem
- Next by thread: substr ldap php
- Index(es):
Relevant Pages
|