Code Comments
Programming Forum and web based access to our favorite programming groups.Problem Reading File when Name contains "?" I am trying to access all of the files in a directory, using $a=opendir($dir) ; while ($file=readdir($a)) and $b=file_get_contents($dir."/".$file). However, when $file contains characters chr(63 or 164 or 186) $b is "". I tried substituting each of the characters chr(0 to 255) for a single chr(63) i.e. "?" in file names but none of the resulting names created a value for $b other than "". How do I read these file contents? P -
Post Follow-up to this messagePHPBABY3 wrote: > Problem Reading File when Name contains "?" > > I am trying to access all of the files in a directory, using > $a=opendir($dir) ; while ($file=readdir($a)) and > $b=file_get_contents($dir."/".$file). However, when $file contains > characters chr(63 or 164 or 186) $b is "". I tried substituting each > of the characters chr(0 to 255) for a single chr(63) i.e. "?" in file > names but none of the resulting names created a value for $b other > than "". I think this is a trouble that has to do with the file system you are using, some file systems requires prepending "\\?\" to the file name to be able to get around it's normal file name checks. I do suggest you try a POSIX files system -- //Aho
Post Follow-up to this messagePaula Abdul , Panties sliding down a perfectly round ass! http://www.CheapVideoBlog.com/Watch?clip=726648
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.