pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chris <dmagick@gmail.com>
To: Junior <sktjuniors@gmail.com>
Cc: pgsql-php@postgresql.org
Subject: Re: Get Extension in Bytea Type
Date: Tue, 29 May 2007 10:18:55 +1000
Message-ID: <465B716F.10506@gmail.com> (raw)
In-Reply-To: <4822bcbf0705281233i48e3e58em854f87f63d642228@mail.gmail.com>
References: <4822bcbf0705281233i48e3e58em854f87f63d642228@mail.gmail.com>

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/



view thread (2+ messages)

Message-ID: <465B716F.10506@gmail.com>
Permalink:  ../465B716F.10506@gmail.com/
Also on:    postgresql.org/message-id/465B716F.10506@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: dmagick@gmail.com, sktjuniors@gmail.com
  Subject: Re: Get Extension in Bytea Type
  In-Reply-To: <465B716F.10506@gmail.com>
  References: <4822bcbf0705281233i48e3e58em854f87f63d642228@mail.gmail.com> <465B716F.10506@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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