Q:

how to read the content of text files having white space between file name? 

I want to get the content in a text file and I am using file_get_contents() 
But problem starts when I try to read files having white space into the file name. 
for example: /home/project/text cv.txt cannot be read using file_get_contents(). 
Is there any alternative to read .txt files ?  

A:

There is a hint in the documentation:
If you're opening a URI with special characters, such as spaces, you need to encode the URI with urlencode(). 

A:

Another option would be to use realpath() to wrap the URI to your file:
$path = realpath( dirname(__FILE__).'/../_files/file with space.txt' );
$data = file_get_contents($path);

