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
Return to the default flat view Create a new topic Submit Reply
Re: ftp with win-filenames with chr#32 ? [message #175054] Tue, 09 August 2011 01:18 Go to previous message
Norman Peelman is currently offline  Norman Peelman
Messages: 126
Registered: September 2010
Karma:
Senior Member
On 08/08/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

Looks like you're mixing Windows paths with a linux/unix server...
but since it is possible to to have directories named like that, try:

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

You need to escape the ':' and spaces... and check the permissions.

--
Norman
Registered Linux user #461062
-Have you been to www.php.net yet?-
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Adding a record to a database
Next Topic: xml search using javascript
Goto Forum:
  

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

Current Time: Fri Nov 29 23:10:51 GMT 2024

Total time taken to generate the page: 0.04848 seconds