What is the potential issue with the file_exists function in the provided PHP code?

The potential issue with the file_exists function in the provided PHP code is that it does not check if the file exists within the specified directory. To solve this issue, you should include the directory path in the file path parameter of the file_exists function.

$file = 'uploads/' . $_POST['filename'];

if (file_exists($file)) {
    echo "File exists!";
} else {
    echo "File does not exist!";
}