You are here: Re: $_FILES problem « PHP Programming Language « IT news, forums, messages
Re: $_FILES problem

Posted by Iced Milk Tea on 09/08/05 09:07

Thanks a lot for your help!

I think bcoz' I haven't moved the file so problem arise.

But why does $_FILES['userfile']['name'] is working?



Barry 寫道:

> hi
>
> don't rely on $_FILES['name']['type'] as php relies on the browser to
> supply this.
> here's a function from the contrib notes:
>
> if (!function_exists('mime_content_type')) {
> function mime_content_type($f) {
> $f = escapeshellarg($f);
> return trim( `file -bi $f` );
> }
> }
>
> have you moved the uploaded file yet?
> the path to the actual file is being kept in $_FILES['name']['tmp_name']
> so your 1st piece of code shouldn't work.
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация