Ask a Question related to PHP Development, Design and Development.
-
OneSolution #1
PHP and file uploads
Hi All,
Here's one thing that I don't know much about - file uploading. As part of
my project, I will have to build a file manager of sorts - perhaps a
document manager. Anyhow, this involves allowing my user to upload files to
a location.
I know PHP can do it - I know this because it sure does everything else ...
but I don't know this from any authoritative source.
So ... can you tell me if PHP can handle files uploads, and if so, what are
the drawbacks that you might have learned of in your experience? For
instance, in the ASP world, using a COM object for the upload works, but
apparently has significant impact on performance.
So anyway, advise (advice???) me ...
Thanks,
Santosh
OneSolution Guest
-
Web File uploads
While trying to do a simple file upload via a web form, (enctype="multipart/form-data"), I've run into a problem that has me stymied. This is an... -
Specify temp directory and file name for file uploads?
I'm interested in understanding how MX processes file uploads. 1) By default, uploaded files seem to be placed in the... -
File Uploads
Hello You must use <form action="uploadItem.php" method="post" enctype="multipart/form-data"> gerwazy POLAND -
#24919 [Com]: PHP File Uploads in RAM
ID: 24919 Comment by: jgiglio at netmar dot com Reported By: jgiglio at smythco dot com Status: Bogus Bug... -
#24919 [NEW]: PHP File Uploads in RAM
From: jgiglio at smythco dot com Operating system: Linux PHP version: Irrelevant PHP Bug Type: Feature/Change Request Bug... -
Richard Grove #2
Re: PHP and file uploads
"OneSolution" <onesolution@jatakainc.com> wrote in message
news:IGiwb.171$q57.133805181@newssvr11.news.prodig y.com...of> Hi All,
>
> Here's one thing that I don't know much about - file uploading. As partto> my project, I will have to build a file manager of sorts - perhaps a
> document manager. Anyhow, this involves allowing my user to upload files....> a location.
>
> I know PHP can do it - I know this because it sure does everything elseare> but I don't know this from any authoritative source.
>
> So ... can you tell me if PHP can handle files uploads, and if so, whatIt's really easy, just use the right form field, and be sure to copy it to a> the drawbacks that you might have learned of in your experience? For
> instance, in the ASP world, using a COM object for the upload works, but
> apparently has significant impact on performance.
>
> So anyway, advise (advice???) me ...
>
> Thanks,
> Santosh
>
>
location. Remember, it is a temp file until you copy it somewhere. This
means it is gone once your script has finished.
$filename=$HTTP_POST_FILES['file']['name'];
$uploadedtempfile=$HTTP_POST_FILES['file']['tmp_name'];
$newfilepath="WHATEVER";
copy ($uploadedtempfile, $newfilepath);
Regards
Richard Grove
[url]http://shopbuilder.org[/url] - ecommerce systems
Become a Shop Builder re-seller:
[url]http://www.affiliatewindow.com/affiliates/merchantdetails.php?mid=611[/url]
[url]http://www.affiliatewindow.com/a.pl?590[/url]
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system ([url]http://www.grisoft.com[/url]).
Version: 6.0.536 / Virus Database: 331 - Release Date: 03/11/2003
Richard Grove Guest
-
Von Heler #3
Re: PHP and file uploads
"Richard Grove" <info[at]redeyemedia[dot]co[dot]uk> wrote in
news:3fc1cb60$0$103$65c69314@mercury.nildram.net:
You could think about using PEAR http upload, which I found useful.> "OneSolution" <onesolution@jatakainc.com> wrote in message
> news:IGiwb.171$q57.133805181@newssvr11.news.prodig y.com...> of>> Hi All,
>>
>> Here's one thing that I don't know much about - file uploading. As
>> part> to>> my project, I will have to build a file manager of sorts - perhaps a
>> document manager. Anyhow, this involves allowing my user to upload
>> files> ...>> a location.
>>
>> I know PHP can do it - I know this because it sure does everything
>> else> are>> but I don't know this from any authoritative source.
>>
>> So ... can you tell me if PHP can handle files uploads, and if so,
>> what>>> the drawbacks that you might have learned of in your experience? For
>> instance, in the ASP world, using a COM object for the upload works,
>> but apparently has significant impact on performance.
>>
>> So anyway, advise (advice???) me ...
>>
>> Thanks,
>> Santosh
>>
>>
> It's really easy, just use the right form field, and be sure to copy
> it to a location. Remember, it is a temp file until you copy it
> somewhere. This means it is gone once your script has finished.
>
> $filename=$HTTP_POST_FILES['file']['name'];
> $uploadedtempfile=$HTTP_POST_FILES['file']['tmp_name'];
> $newfilepath="WHATEVER";
> copy ($uploadedtempfile, $newfilepath);
>
> Regards
> Richard Grove
>
> [url]http://shopbuilder.org[/url] - ecommerce systems
> Become a Shop Builder re-seller:
> [url]http://www.affiliatewindow.com/affiliates/merchantdetails.php?mid=611[/url]
> [url]http://www.affiliatewindow.com/a.pl?590[/url]
>
>
>
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system ([url]http://www.grisoft.com[/url]).
> Version: 6.0.536 / Virus Database: 331 - Release Date: 03/11/2003
>
>
>
VonHeler
Von Heler Guest
-
Von Heler #4
Re: PHP and file uploads
Von Heler <vonheler@hotmail.com> wrote in
news:Xns943D63D76C9C8vonvonde@130.133.1.4:
[url]http://pear.php.net/package/HTTP_Upload[/url]> "Richard Grove" <info[at]redeyemedia[dot]co[dot]uk> wrote in
> news:3fc1cb60$0$103$65c69314@mercury.nildram.net:
>>>> "OneSolution" <onesolution@jatakainc.com> wrote in message
>> news:IGiwb.171$q57.133805181@newssvr11.news.prodig y.com...>> of>>> Hi All,
>>>
>>> Here's one thing that I don't know much about - file uploading. As
>>> part>> to>>> my project, I will have to build a file manager of sorts - perhaps a
>>> document manager. Anyhow, this involves allowing my user to upload
>>> files>> ...>>> a location.
>>>
>>> I know PHP can do it - I know this because it sure does everything
>>> else>> are>>> but I don't know this from any authoritative source.
>>>
>>> So ... can you tell me if PHP can handle files uploads, and if so,
>>> what>>>>> the drawbacks that you might have learned of in your experience? For
>>> instance, in the ASP world, using a COM object for the upload works,
>>> but apparently has significant impact on performance.
>>>
>>> So anyway, advise (advice???) me ...
>>>
>>> Thanks,
>>> Santosh
>>>
>>>
>> It's really easy, just use the right form field, and be sure to copy
>> it to a location. Remember, it is a temp file until you copy it
>> somewhere. This means it is gone once your script has finished.
>>
>> $filename=$HTTP_POST_FILES['file']['name'];
>> $uploadedtempfile=$HTTP_POST_FILES['file']['tmp_name'];
>> $newfilepath="WHATEVER";
>> copy ($uploadedtempfile, $newfilepath);
>>
>> Regards
>> Richard Grove
>>
>> [url]http://shopbuilder.org[/url] - ecommerce systems
>> Become a Shop Builder re-seller:
>> [url]http://www.affiliatewindow.com/affiliates/merchantdetails.php?mid=611[/url]
>> [url]http://www.affiliatewindow.com/a.pl?590[/url]
>>
>>
>>
>>
>>
>> ---
>> Outgoing mail is certified Virus Free.
>> Checked by AVG anti-virus system ([url]http://www.grisoft.com[/url]).
>> Version: 6.0.536 / Virus Database: 331 - Release Date: 03/11/2003
>>
>>
>>
> You could think about using PEAR http upload, which I found useful.
>
> VonHeler
>
Von Heler Guest
-
kafooey #5
Re: PHP and file uploads
On Mon, 24 Nov 2003 07:45:44 GMT, "OneSolution"
<onesolution@jatakainc.com> wrote:
PHP does file uploads - but you need to check the server is configured>So ... can you tell me if PHP can handle files uploads, and if so, what are
>the drawbacks that you might have learned of in your experience? For
>instance, in the ASP world, using a COM object for the upload works, but
>apparently has significant impact on performance.
to allow it easily. The upload methods built into the language can be
turned off in the PHP configuration file on the server.
If you are running in some kind of "safe" environment where the upload
facility has been switched off, you can usually get around it by
opening an FTP connection and sending the various FTP commands (which
works really well actually).
kafooey
- [email]kafooey@nospam.yahoo.co.uk[/email]
- [url]http://www.pluggedout.com/blog[/url]
kafooey Guest
-
R. Rajesh Jeba Anbiah #6
Re: PHP and file uploads
"OneSolution" <onesolution@jatakainc.com> wrote in message news:<IGiwb.171$q57.133805181@newssvr11.news.prodi gy.com>...
1. Use Google ( [url]http://www.google.com/search?q=file+upload+PHP[/url] )> Hi All,
>
> Here's one thing that I don't know much about - file uploading. As part of
> my project, I will have to build a file manager of sorts - perhaps a
> document manager. Anyhow, this involves allowing my user to upload files to
> a location.
>
> I know PHP can do it - I know this because it sure does everything else ...
> but I don't know this from any authoritative source.
>
> So ... can you tell me if PHP can handle files uploads, and if so, what are
> the drawbacks that you might have learned of in your experience? For
> instance, in the ASP world, using a COM object for the upload works, but
> apparently has significant impact on performance.
>
> So anyway, advise (advice???) me ...
2. Use php.net (
[url]http://www.google.com/search?q=file+upload+site%3Awww%2Ephp%2Enet[/url] )
---
"Dying is an art, like everything else"---Sylvia Plath
Email: rrjanbiah-at-Y!com
R. Rajesh Jeba Anbiah Guest
-
FLEB #7
Re: PHP and file uploads
Regarding this well-known quote, often attributed to OneSolution's famous
"Mon, 24 Nov 2003 07:45:44 GMT" speech:
The only drawback of PHP uploading is that the entire file(s) needs to be> Hi All,
>
> Here's one thing that I don't know much about - file uploading. As part of
> my project, I will have to build a file manager of sorts - perhaps a
> document manager. Anyhow, this involves allowing my user to upload files to
> a location.
>
> I know PHP can do it - I know this because it sure does everything else ...
> but I don't know this from any authoritative source.
>
> So ... can you tell me if PHP can handle files uploads, and if so, what are
> the drawbacks that you might have learned of in your experience? For
> instance, in the ASP world, using a COM object for the upload works, but
> apparently has significant impact on performance.
>
> So anyway, advise (advice???) me ...
>
> Thanks,
> Santosh
uploaded before PHP processes, which rules out things like progress bars
and stopping invalid uploads early.
There's a PERL-to-PHP sort of snap-in for this that someone's made, but I
don't recall the URL (anyone?).
--
-- Rudy Fleminger
-- [email]sp@mmers.and.evil.ones.will.bow-down-to.us[/email]
(put "Hey!" in the Subject line for priority processing!)
-- [url]http://www.pixelsaredead.com[/url]
FLEB Guest
-
R. Rajesh Jeba Anbiah #8
Re: PHP and file uploads
FLEB <soon.the.sp@mmers.and.evil.ones.will.bow-down-to.us> wrote in message news:<1gzrnr9atpp9e$.1vgb810lp9j7h$.dlg@40tude.net >...
[url]http://www.google.com/search?q=php+upload+progress[/url]> Regarding this well-known quote, often attributed to OneSolution's famous
> "Mon, 24 Nov 2003 07:45:44 GMT" speech:
>>> > Hi All,
> >
> > Here's one thing that I don't know much about - file uploading. As part of
> > my project, I will have to build a file manager of sorts - perhaps a
> > document manager. Anyhow, this involves allowing my user to upload files to
> > a location.
> >
> > I know PHP can do it - I know this because it sure does everything else ...
> > but I don't know this from any authoritative source.
> >
> > So ... can you tell me if PHP can handle files uploads, and if so, what are
> > the drawbacks that you might have learned of in your experience? For
> > instance, in the ASP world, using a COM object for the upload works, but
> > apparently has significant impact on performance.
> >
> > So anyway, advise (advice???) me ...
> >
> > Thanks,
> > Santosh
> The only drawback of PHP uploading is that the entire file(s) needs to be
> uploaded before PHP processes, which rules out things like progress bars
> and stopping invalid uploads early.
>
> There's a PERL-to-PHP sort of snap-in for this that someone's made, but I
> don't recall the URL (anyone?).
---
"Dying is an art, like everything else"---Sylvia Plath
Email: rrjanbiah-at-Y!com
R. Rajesh Jeba Anbiah Guest



Reply With Quote

