Re: Upload using FTP commands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 26, 2010 at 12:37 PM, Ashley Sheridan
<ash@xxxxxxxxxxxxxxxxxxxx>wrote:

> On Thu, 2010-08-26 at 17:24 +0100, Matthew Croud wrote:
>
> > Hi,
> >
> > I want to give my client the ability to upload large files ( around
> > 20MB ) to a webspace.
> > I reckon that using the FTP commands of PHP would be the best bet, but
> > is it possible to allow them to do this through an online form.
> >
> > This is my vision: the client logs in to a form that has an upload
> > button, and the upload button uses the FTP commands to upload the file.
> >
> > Is that do-able in PHP ?
> >
> > Cheers!
> >
> >
> >
> >
> >
> >
> >
>
> What would be the point?
>
> You would have to set up your server to allow large files to be uploaded
> in order for them to be used by PHP, and by that time, unless you're
> putting them onto a remote server, there's no point in using the FTP
> functions of PHP.
>

Ashley makes a nice point.  When I have control over the server, I don't use
PHP's FTP capabilities at all.  However, on some shared severs you're only
HTTP upload options are to set a directory to 777 (Yikes!), or do some work
with PHP's FTP functions.

What I've done in the past on shared hosts is setup an upload FTP account
that has access to one directory.  Then, I develop a form to upload the
file.  Once a file is uploaded, I use PHP's FTP functions to place the file
in the directory.  This way I avoid the security issues of 777, maintain an
easy-to-use interface (some clients don't want to use FTP), and continue to
use the hosting the client prefers.  There is a cost to this method, but
sometimes it's worth the cost.

Just another way of doing things.

Adam

-- 
Nephtali:  PHP web framework that functions beautifully
http://nephtaliproject.com

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux