Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- file_get_contents & spaces in file name
July 8, 2008, 7:48 pm
rate this thread
I'm running php on linux. Oddly enough, there are files that I must parse
with php where the file name contains one or more spaces. Permissions are
set correctly, however file_get_contents returns blank. Do I need to do
anything special to be able to get at these files?
Example file name:
DALCO - APR 2008 INVOICING.pdf
Re: file_get_contents & spaces in file name
sorry, I cannot confirm that. My tests output the content of a file whos
name contains blanks.
I'd do three things in your case:
a) check if the whitespaces are blanks or something else. Are the filename
and the name you want to open the file under *really* the *same* ?
b) check the return value of fel_get_contents(). Ist it really empty ? I
cannot belive that. It should return FALSE in case of a problem.
c) post a complete example
- — Previous thread in » PHP Scripting Forum