PHP > Random > Beginner Next/Skip this question

What would be the output of the following PHP code, using fgetc?

input.txt
This is
sample
file


main.php
<html>
<head>
<title>PHP</title>
</head>
<body>
<?php
  
  $fp = fopen( "input.txt", "r" );
  while ( ! feof( $fp ) )
  {
    $line = fgetc( $fp );
    echo $line;
  }
?>
</body>
</html>
Answers :
Explaination :
social share share on facebook share on twitter share on google plus share on linkedin
Add Comments :

Login

Register

Next Question