Reply to Trouble using ftp_put

Your name:

Reply:


Posted by laredotornado on 11/14/06 01:20

Hi,

I'm using PHP 4.4.4 with Apahce 2.2 on Fedora Core 5 Linux. I'm having
trouble figuring out why an ftp_put call is failing. Is there a way I
can get an exact reason other than checking whether it has succeeded or
failed?

Here is my code

$conn_id = ftp_connect($ftp_host);
if ($conn_id) {
// login with username and password
$login_result = ftp_login($conn_id,
$ftp_user, $ftp_pwd);
if ($login_result) {
// Disable passive mode
ftp_pasv($conn_id, false);

// upload the file
$remote_path = "$ftp_dir/" .
SQL_PRODUCT_SHORT_FILE_NAME;
$upload = ftp_put($conn_id,
$remote_path, $sql_file_path, FTP_ASCII);

// check upload status
if (!$upload) {
die("FTP upload has
failed!");

I'm getting the message "FTP upload has failed" indicating things have
died. Still don't know why.

Thanks, - Dave

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация