Uploading and verifying word and excel files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
I checked at http://www.php.net/manual/en/features.file-upload.php and all the user notes, and also the PEAR solution for uploading files and I still have a couple of questions.

I need to create a form to allow users to upload (and later to delete) MS word, excel and jpg files. Through your help I was able to validate image files using getimagesize() and have made a nice script to upload and rename images.

I cannot see a way to validate or examine Word or Excel files for validity (and assume that older word files would validate differently from newer ones).

The PEAR http upload script mentioned twice in the user notes at that manual page does not *seem* to validate other than denying certain extensions like php, php3, etc. I could be wrong of course.

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.


So my questions:
1. How do you validate Word and Excel files before upload?

2. How can I make a passthrough from a file above public_html to one below it so that people can surf in with a browser and download files which have been uploaded by the script?

Thanks in advance,
JJ

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux