What are the implications of using 'r' as the second parameter in the file_get_contents() function and how can it affect the functionality?

Using 'r' as the second parameter in the file_get_contents() function opens the file for reading only. This means that the file cannot be written to or modified. If you need to read and write to the file, you should use 'r+' instead.

$file = 'example.txt';
$data = file_get_contents($file, 'r+');
// Now you can read and write to the file