failure in Uploadfunction
| From: | Ruprecht Helms | Date: | Mon, 14 Jul 2003 12:25:59 +0000 |
| Subject: | failure in Uploadfunction | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-29228@lists.php.net to get a copy of this message | ||
Hi,
I want to make a fileupload via php within a script that insert values
into a database. By executing the script I get the error that ftp-put
can function, because there is no correct login into the ftp-server
(user and password is required). Replace the emailadress against the
userpassword I get no error, but I get no result - file in the subfolder
upload of the directory-path.
I tried ftp-login but it also fails with a error. As FTP-Server I use
the proftpd.
$conn_id=ftp_connect('127.0.0.1');
ftp_login($conn_id,'rhelms','rhelms@mayn.de');
$upload=ftp_put($conn_id,'/srv/www/htdocs/chorportal/upload/'+$logo,$logo,FTP_BINARY);
if (!$upload)
{
echo "FTP failed";
}
else
{
echo "FTP-Upload successful";
}
How have I to correct the script that the upload functions properly.
Regards,
Ruprecht