Re: uploading file encoding error
| From: | Ashley Sheridan | Date: | Thu, 27 May 2010 14:57:08 +0000 |
| Subject: | Re: uploading file encoding error | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-305567@lists.php.net to get a copy of this message | ||
On Thu, 2010-05-27 at 17:49 +0300, Manolis Vlachakis wrote:
> hallo there everyone!
> i am uploading a file in a php applet i developed and i face a problem
> while i upload greek named files..
> have no problem with the english or so on files...
> is there a way to use iconv or something else so as to solve my problem ?
> my code looks like that...
>
>
> $uploaddir = $_SERVER['DOCUMENT_ROOT'] . '/****
> /****/public_html/uploads/';
> $file = $uploaddir . basename($_FILES['uploadfile']['name']);
> if (move_uploaded_file($_FILES['uploadfile']['tmp_name'], $file)) {
> echo "success";
> } else {
> echo "error";
> }
>
>
>
> thanx
>
I assume that the file upload works with other files?
Firstly, what is the filesystem that you're using, and the operating
system. Windows filesystems are very limiting on what characters you can
use.
If you have it working with another file, have you tried renaming that
to use characters which you think are causing the problems?
Lastly, what exactly is the error code returned from the $_FILES array?
Thanks,
Ash
http://www.ashleysheridan.co.uk