Gerald Timothy Quimpo wrote:
On Sunday 12 January 2003 07:08 am, Mat Harris wrote:

Patti\ Smith/Horses\ \[1975\]/01-Gloria.mp3

but fopen will still refuse saying file not found. I have tried escaped
and unescaped amnd yes, I am very sure the file is there.

How can I get fopen to accept a path like this?

$in=fopen("a filename with spaces in it.mp3","r");

works for me.  how are you getting filenames?  it might be that it's
the directory reading functions that are giving you bad filenames.
(although, i just tried (not copy-pasted, so close but not exactly
what i tested):

   $dir=opendir(".");
   while(($dd=readdir($dir))!=false)
      print("$dd\n");
   closedir($dir);

and that works for a directory that has files with spaces in them.
all filenames are printed, including the names that have spaces.

another possibility, are those backslashes just for displaying?  or
are they actually there in the filename on disk?  if the backslashes
are actual parts of the filename (they shouldn't be, but the world
is weird) then you'll need to escape them.  "\\".

tiger

not escaping the filename worked. weird. i spend a good hour writing a function to make sure they were properly escaped. i thought i tried it this way before, but never mind.

thanks

--
Mat Harrison Network Systems Administrator
[EMAIL PROTECTED] www.genestate.com

Attachment: msg92657/pgp00000.pgp
Description: PGP signature

Reply via email to