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 -- Gerald Timothy Quimpo tiger*quimpo*org gquimpo*sni-inc.com tiger*sni*ph Public Key: "gpg --keyserver pgp.mit.edu --recv-keys 672F4C78" Veritas liberabit vos. Doveryai no proveryai. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php