Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Problem Reading File when Name contains "?"
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 -

Report this thread to moderator Post Follow-up to this message
Old Post
PHPBABY3
03-09-08 12:05 AM


Re: Problem Reading File when Name contains "?"
PHPBABY3 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

Report this thread to moderator Post Follow-up to this message
Old Post
J.O. Aho
03-09-08 10:04 AM



Paula Abdul , Panties sliding down a perfectly round ass!

http://www.CheapVideoBlog.com/Watch?clip=726648

Report this thread to moderator Post Follow-up to this message
Old Post
8175
03-20-08 10:24 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP SQL archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 10:36 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.