Discussion Locked

How to send HTML using PHP

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

How to send HTML using PHP, can do in ASP but have not found an equal?

Cheers

2 replies

by techexec2

.
METHOD 1: A "PHP script file" (usually a file ending in .php) that does not contain any PHP code already is sent as HTML. All text in the file will be sent to the browser as an HTML web page.

METHOD 2: A "PHP script file" that contains only PHP can send an HTML web page like this:

<?php

print <<< EOF
<html>
<head>
<title>This is my title</title>
</head>
<body>
<font size="7">
Hello World!
</font>
</body>
</html>

EOF;

?>

This discussion is closed to new replies.