Re: upload file problem
| From: | Jignesh Thummar | Date: | Fri, 01 Aug 2008 05:36:46 +0000 |
| Subject: | Re: upload file problem | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-277574@lists.php.net to get a copy of this message | ||
Thanks.. It's fixed...
- Jignesh
On Thu, Jul 31, 2008 at 6:05 PM, brian <php@logi.ca> wrote:
> 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}";
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>