FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Re: ftp with win-filenames with chr#32 ?
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Re: ftp with win-filenames with chr#32 ? [message #175056] Tue, 09 August 2011 02:15 Go to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 8/8/2011 12:39 PM, Bjarne Jensen wrote:
> if (ftp_chdir($conn_id, "C:\Program Files")) {
> echo "REMOTE dir is now: " . ftp_pwd($conn_id) . "<br>";
> }
> else { echo "Couldn't change directory\n";
> }
>
>
> Warning: ftp_chdir() [function.ftp-chdir]: "C:\Program Files": Directory
> not found. in /var/www/ftp.php on line 20
> Couldn't change directory
>
> ---------
>
> How do you work around that?
> (yes, the dir is there)
>
> /Bjarne

Another option:

ftp_chdir($conn_id, "C:/Program Files")

Windows accepts forward slashes as well as backslashes (although some
Windows programs do not). But the same comment on permissions applies.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: ftp with win-filenames with chr#32 ? [message #175061 is a reply to message #175056] Tue, 09 August 2011 10:55 Go to previous message
Bjarne Jensen is currently offline  Bjarne Jensen
Messages: 9
Registered: January 2011
Karma: 0
Junior Member
Thanks.

In the end I found

ftp_chdir($conn_id, "\\Program Files\\NextDir"))

also works ;)

/Bjarne
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: ftp with win-filenames with chr#32 ?
Next Topic: monitoring IP address calls of a PHP application
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 20 19:28:27 GMT 2024

Total time taken to generate the page: 0.08419 seconds