PHP Classes

CHDIR to Directory name with spaces

Recommend this page to a friend!

      Advanced FTP client class  >  All threads  >  CHDIR to Directory name with spaces  >  (Un) Subscribe thread alerts  
Subject:CHDIR to Directory name with spaces
Summary:chdir will fail with directory name with spaces
Messages:2
Author:Jorge Ramirez
Date:2009-01-27 00:00:59
Update:2009-01-27 00:29:24
 

  1. CHDIR to Directory name with spaces   Reply   Report abuse  
Picture of Jorge Ramirez Jorge Ramirez - 2009-01-27 00:00:59
chdir works with constant strings with spaces e.g.

$myftp->chdir("some/directory"/with spaces no problem"); // This works

But if I read a string from a text file and use that string as a $var to chdir it fails e.g:

$myftp->chdir($dirnameobtainedfromatextfile); // this failes

Do I have to scape spaces? is it related to the Server

Regards

Zag

  2. Re: CHDIR to Directory name with spaces   Reply   Report abuse  
Picture of Jorge Ramirez Jorge Ramirez - 2009-01-27 00:29:24 - In reply to message 1 from Jorge Ramirez
I worked it around by exploding the full path in individual dirs then doing one chdir a time

but for some reason doing a chdinr with multiples subdirs and spaces in the string does not work

regards