You are here: Re: [PHP] Uploading and verifying word and excel files « PHP « IT news, forums, messages
Re: [PHP] Uploading and verifying word and excel files

Posted by Jack Jackson on 10/20/53 11:19

John Nichel wrote:
> Jack Jackson wrote:
> <snip>
>
>> Also, it seems that directories must be blown wide open (777) to allow
>> the script to copy the file over from /tmp. My ISP won't allow
>> directories to be set to 777 under public_html/ -- but we need to
>> access the files via web browser which is the whole point.
>
>
> It shouldn't have to be this way. The webserver should be configured to
> run as your virtual user, or belong to a group which has write
> permission to that directory, or.....I'm getting a bit off track with
> that. This is something you'll have to take up with your ISP.

Will do.

>
>> So my questions:
>> 1. How do you validate Word and Excel files before upload?
>
>
> Before? JavaScript...if JavaScript can even do it (I haven't touched
> the stuff in ages). After upload, you can check the mime type, but
> that's not foolproof.
>

Okay, sorry I miswrote: after upload to the temp directory, BEFORE using
move_uploaded_file(). Checking the mime type is the problem - if I can't
trust the browsers am I really reliant on the file extension? Can't I
peek in some manner into it as we do with getimagesize()?

 

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

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