Re: is_uploaded_file() emulation?
| From: | Edward van Bilderbeek - Bean IT | Date: | Wed, 27 Feb 2002 08:21:54 +0000 |
| Subject: | Re: is_uploaded_file() emulation? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-86381@lists.php.net to get a copy of this message | ||
What about:
ENV["USER"]
or
ENV["USERNAME"]
(see phpinfo())...
Greets,
Edward
----- Original Message -----
From: "Bogdan Stancescu" <mgv@fx.ro>
To: "Martin Towell" <martin.towell@world.net>
Cc: <bogdan@lanifex.com>; "Stewart Gateley" <stewartg2000@yahoo.com>;
<php-general@lists.php.net>
Sent: Wednesday, February 27, 2002 12:37 AM
Subject: Re: [PHP] is_uploaded_file() emulation?
> Yeah, that's what I looked at before posting - but there's a catch:
> "Returns the user ID of the **current script**, or *FALSE* on error". :-(
>
> Bogdan
>
> Martin Towell wrote:
>
> > try: http://www.php.net/manual/en/function.getmyuid.php
> >
> > -----Original Message-----
> > From: Bogdan Stancescu [mailto:mgv@fx.ro ]
> > Sent: Wednesday, February 27, 2002 10:33 AM
> > To: Stewart Gateley
> > Cc: bogdan@lanifex.com; php-general@lists.php.net
> > Subject: Re: [PHP] is_uploaded_file() emulation?
> >
> >
> > Thank you - but that wasn't the question - as you can see, I started the
> > second paragraph with a reference to that function - my problem is what
> > I compare the result to - i.e. how do I find out *my* UID, not the
> > file's.
> >
> > Mr. Kelly's solution should work, but it's rather absurd (from a PHP
> > point of view) to have to create a file just to find out what my uid
> > is... I'm sure there should be a more reasonable method - but I don't
> > know it. Hoping somebody does... ;-)
> >
> > Thanks!
> >
> > Bogdan
> >
> > Stewart Gateley wrote:
> >
> > >$owner = fileowner ($file);
> > >
> > >returns a string containing the owner or false. see
> > > http://www.php.net/manual/en/ref.filesystem.php
> > >
> > >-- Stewart
> > >
> > >--- Bogdan Stancescu <mgv@fx.ro> wrote:
> > >
> > >>Hello all!
> > >>
> > >>How do I find out if a file was actually uploaded /without/ using
> > >>is_uploaded_file()?
> > >>
> > >>My first though is that I should use fileowner() on the file and see
> > >>if
> > >>it's the same as the user who runs PHP (Apache) - but how do I find
> > >>that
> > >>out? I don't want to use exec("id -u") either because the syntax
> > >>may
> > >>be
> > >>different for distinct systems and I'd like to avoid system calls if
> > >>possible.
> > >>
> > >>I'm open to any suggestions to solve the original problem - not
> > >>necessarily using UID's.
> > >>
> > >>Thanks!
> > >>
> > >>Bogdan
> > >>
> > >>
> > >>
> > >>--
> > >>PHP General Mailing List ( http://www.php.net/)
> > >>To unsubscribe, visit:
> > >>http://www.php.net/unsub.php
> > >>
> > >
> > >
> > >__________________________________________________
> > >Do You Yahoo!?
> > >Yahoo! Greetings - Send FREE e-cards for every occasion!
> > > http://greetings.yahoo.com
> > >
> >
> >
> >
> >
> > --
> > PHP General Mailing List ( http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>