You are here: Re: Creating link to file or temp file for user download « PHP Programming Language « IT news, forums, messages
Re: Creating link to file or temp file for user download

Posted by Jerry Stuckle on 06/21/05 05:45

dspohn wrote:
> I am designing a document management system (DMS). The files are stored
> in a directory on the webserver. The filenames for the documents are
> stored in a MySQL database. The DMS will track revisions from the
> initial version through the updates. We must have strict permissions
> set so only authorized personnel can access some documents. All of the
> documents when uploaded are given totally random names such as
> "114723fb5422c6bd5ed18f6.doc". Is there a way, without the webserver
> creating a new file name "document_specs_ver2.doc" to have the file
> download named "document_specs_ver2.doc".
>
> If I must physically create a new file, how do I know when the
> webserver would be allowed to delete it? Notes: The files will be in
> several different file formats, not just "doc".
>
> Thanks in Advance,
>
> dspohn
>

Alternatively, if you're running under Apache, you can use mod_rewrite
and .htaccess. mod_rewrite can pick up the file named
"document_specs_ver2.doc" and instead download
"114723fb5422c6bd5ed18f6.doc", for instance. .htaccess can also control
access to the files and directories.

You'd have to manage the .htaccess file - but if the data doesn't change
that much, it's pretty easy.

You might also look at a mod_rewrite for mysql - I don't know if one
exists or not. However, there is a mod_auth_mysql on sourceforge.net to
handle the authorizations.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

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

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