PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Networking » Net_FTP » Bug #238

Net_FTP dont accept absolute file path

Details

Submitted2003-11-13 13:36 UTC
FromSascha dot Hierold at jesaya dot de
StatusBogus
PackageNet_FTP
PHP Version4.3.1
OSWindows 2000
Roadmaps(Not assigned)

Comments

[2003-11-13 13:36 UTC] Sascha dot Hierold at jesaya dot de

Description:
------------
Net_FTP dont accept absolute path by $ftp->put() command.

Reproduce code:
---------------
$ftp = new Net_FTP("www.XXXXXX.de", 21);
$ftp->setUsername("XXXXXX");
$ftp->setPassword("XXXXXX");
$ftp->connect();
$ftp->login();

$test = $ftp->put("d:\leobar.dll", $a->getAuthData("WorkingPath")."/test.txt");
echo "<h1>".$test->getMessage()."</h1>";
$ftp->disconnect();

$items = &File_Find::glob("*.*", $a->getAuthData("WorkingPath")."/", "perl");

Expected result:
----------------
I dont want to see anything. I want to upload the file to my FTP-Server.

Actual result:
--------------
Local file 'd:\leobar.dll' does not exist.

[2003-11-13 19:19 UTC] me at mkone dot net

Seems you have to escape the backslash:
d:\\leobar.dll instead of d:\leobar.dll

[2003-12-31 10:34 UTC] chip at php dot net

Thank you for taking the time to write to us, but this is not
a bug.

slashing paths on win32 should be done by the user, not by Net_FTP.