PHP - File Handling
Identify the error in this PHP code snippet:
$fp = fopen('file.txt', 'r');
$content = fread($fp);
echo $content;$fp = fopen('file.txt', 'r');
$content = fread($fp);
echo $content;fread() requires two parameters: file pointer and length to read.fread($fp) missing the length parameter, causing an error.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions