Re: Intro to PHP question

From: Date: Thu, 08 Mar 2007 23:21:44 +0000
Subject: Re: Intro to PHP question
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-250133@lists.php.net to get a copy of this message
Dave Goodchild wrote:
Of course it's possible to output raw html in a php file, that's one of it's fundamental uses! In fact, it's more efficient to switch the php parser off and send raw html as the php parser doesn't need to get involved. Just to point out, the last person did not say to output html, he said to use html. There is a big difference when working things from he CLI.
each of the following examples worked for me # cat ./cli.php #!/usr/local/bin/php -q <?php echo "<html>"; echo " <body>";
echo "          Hello World!";
echo " </body>"; echo "</html>"; ?> # ./cli.php
<html>  <body>          Hello World!    </body></html>
# cat html.php <html>
        <body>
        <?php echo "Hello World!"; ?>
        </body>
</html> # php html.php <html>
        <body>
        Hello World!    </body>
</html> # cat php.php <?php echo "<html>"; echo " <body>";
echo "          Hello World!";
echo " </body>"; echo "</html>"; ?> # php php.php
<html>  <body>          Hello World!    </body></html>
-- Enjoy, Jim Lucas Different eyes see different things. Different hearts beat on different strings. But there are times for you and me when all such things agree. - Rush

« previous php.general (#250133) next »