File_get_contents() fails to open file

Hello everyone,

Hereis my code :

 <?php
if(!isset($_SESSION['user_id'])){
  session_start();
}
$user_id = $_SESSION['user_id'];
echo "user_id: ".$user_id."<br/>";
echo 'uploads/'.$user_id.'DetailedStatement.html<br/>';
 //Insert statement into a string
$homepage = file_get_contents('uploads/'.$user_id.'DetailedStatement.html' , 'r+') or die("Unable to open file!");;

Here is a screenshot of my uploads directory:
uploads

And here is the error message screenshot :

What is wrong here ?
How can it be resolved ?

Looks like your file is called

2Detailedstatementhtm 

but your php is looking for

2Detailedstatement.html

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.