Reply to Re: Serving Files with PHP

Your name:

Reply:


Posted by Pedro Graca on 11/17/06 23:17

David T. Ashley wrote:
> a)The user has to have a valid session identifier in order to get a file.

Why?
Or, to put it differently, what do you mean "valid session identifier"?
And what good does it do to you when the "user has one"?

> b)The files I'd be serving aren't in directories that Apache can get to
> directly, i.e. not in a "Document Root" or aliased directory (although it
> has the right permissions to get the files).

readfile()
http://php.net/readfile

> Is it possible to do this with PHP?

Yes.

> Can PHP just spit out the right MIME information and then somehow open and
> encode the file and the client will treat it properly?

See mime_content_type()
http://php.net/mime_content_type

> Are there any PHP functions that help with the encoding?

What do you mean?
Maybe some of the function in http://php.net/recode or
http://php.net/unicode would help, but I doubt it.

> Are there any good web references?

Yes. The PHP manual :)
http://php.net/manual


--
I (almost) never check the dodgeit address.
If you *really* need to mail me, use the address in the Reply-To
header with a message in *plain* *text* *without* *attachments*.

[Back to original 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

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