>I am working on some scripts that will allow for uploading of files that >will then be stored in a database with the ability to be listed and >searched. > >What im wondering, is if I have a user upload a file in txt, or doc >format if there is an easy way to read that file, store the information >in the database so it is easily accessable later.
If in doc format, no - MS word is a closed file format, and while you may be able to pick through the files, there is no guarantee as to the meaning of what you find there. Though you may be surprised to find all sorts of interesting things. Txt is just text - no conversion necessary, except perhaps to account for line endings. If you can, try to convert whatever incoming format you encounter to plaintext, and store /that/ in the db. If it's important to you that the original file format be preserverd, then store both: original in a BLOB field or in the filesystem with a pointer from the database, and plaintext version in the database. You might even want to store only keywords from the plaintext version to cut down on storage and processing requirements. --------------------------------------------------------------------- michal migurski- contact info and pgp key: sf/ca http://mike.teczno.com/contact.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php