I'm doing an assignment where I'm supposed to show some text with the MIME-type "text/plain".
<!DOCTYPE html>
<head lang="sv">
<meta charset=utf-8" />
<title>A Title</title>
</head>
<body>
<?php
header("Content-Type: text/plain");
echo("Hello");
?>
</body>
</html>
And "hello" is shown when I load the page. But the problem is that everything else except the PHP code is also shown. That means that the result is a page where all of the HTML code gets print out, as well as the text that I've printed using the echo method.
I don't really know why I'm supposed to show the text using the MIME-type "text/plain", but the assignment says so. Also I'm pretty new to PHP, so this problem might be very easy. But at least I couldn't find any other people who have had the same problem.
So what I want is to show only the text that's in my echo method, and it should have the MIME type "text/plain". Is that even possible?