it may be, that destiny is wrong.
the error-message tells that you don't have access to where you are trying to upload 
the file to.


Thomas

On Wed, 08 Jan 2003 20:59:02 +0100 [EMAIL PROTECTED] (Oliver Witt) wrote:

> I uploaded that script with a common ftp program on my server in the
> internet.
> FOr the host, user and pw, I use the same data as I use to log in with
> my ftp program. So the mistake can't be there.
> This is how that script basically works:
> 
> <?php
> if(isset($destiny)){
> $ftp_server = "host";
> $benutzername = "user";
> $passwort = "pw";
> $connection_id = ftp_connect("$ftp_server");
> $login_result = ftp_login($connection_id, "$benutzername", "$passwort");
> 
> $upload = ftp_put($connection_id, $destiny, $local_file, FTP_ASCII);
> if (!$upload) {
> echo "<p>It didn't work</p>";}
> else {
> echo "<p>It did work</p>";}
> ftp_quit($connection_id);}
> ?>
> 
> <html>
> <head>
> <title></title>
> </head>
> <body bgcolor="#FFFFFF" text="#000000">
> <form action="upload.php" enctype="multipart/form-data" method="POST">
> <input name="local_file" type="file" size="50">
> <br>
> <input type="text" name="destiny">
> <br>
> <input type="submit" value="Submit">
> </form>
> </body>
> </html>
> 
> 
> 
> "Timothy Hitchens )" schrieb:
> 
> > Using ftp_login() ??
> >
> > Timothy Hitchens (HiTCHO)
> > Open Platform Consulting
> > e-mail: [EMAIL PROTECTED]
> >
> > > -----Original Message-----
> > > From: Oliver Witt [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, 9 January 2003 5:30 AM
> > > To: [EMAIL PROTECTED]; Timothy Hitchens )
> > > Subject: Re: [PHP] ftp_put: permission denied
> > >
> > >
> > > "Timothy Hitchens )" schrieb:
> > >
> > > > I am assuming you have testing from a desktop client.
> > > >
> > > > Are you sure that the PHP script has been logged in??
> > > >
> > > > Can you see via a log file of the successful authentication??
> > > >
> > >
> > > I logged in using the same information as I used to upload
> > > that script.
> > >
> > > if ((!$conn_id) || (!$login_result)) {
> > >         echo "Not logged in";
> > >         die;
> > >     } else {
> > >         echo "Logged in";
> > >     }
> > >
> > > That script returned Logged in.
> > > Olli
> > >
> > >
> > >
> > > --
> > > 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

Reply via email to