pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Get Extension in Bytea Type
2+ messages / 2 participants
[nested] [flat]

* Get Extension in Bytea Type
@ 2007-05-28 19:33  Junior <sktjuniors@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Junior @ 2007-05-28 19:33 UTC (permalink / raw)
  To: pgsql-php

Hi, I need get the extension in bytea type, my web system save in database
one file, the file can be many extensions, i need get de extension from this
file for the users can download this file..

Help Please!

Thanks!

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Get Extension in Bytea Type
@ 2007-05-29 00:18  Chris <dmagick@gmail.com>
  parent: Junior <sktjuniors@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Chris @ 2007-05-29 00:18 UTC (permalink / raw)
  To: Junior <sktjuniors@gmail.com>; +Cc: pgsql-php

Junior wrote:
> Hi, I need get the extension in bytea type, my web system save in 
> database one file, the file can be many extensions, i need get de 
> extension from this file for the users can download this file..

If you're not saving the filename you'll have to resort to saving the 
file & then using something like:

exec('file /path/to/file', $out);
print_r($out);


to work it out.

-- 
Postgresql & php tutorials
http://www.designmagick.com/



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2007-05-29 00:18 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-05-28 19:33 Get Extension in Bytea Type Junior <sktjuniors@gmail.com>
2007-05-29 00:18 ` Chris <dmagick@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox