You are here: Re: Unix-style echo? « PHP Programming Language « IT news, forums, messages
Re: Unix-style echo?

Posted by Geoff Berrow on 05/09/07 06:41

Message-ID: <6i52431ir0otlu3h18m4eh2r8nn9g9rimu@4ax.com> from Gilles
Ganault contained the following:

>The reason I ask, is that I'd like to find a lighter alternative to
>this:
>
>---- CODE -----------
>print "<html>\r\n";
>print "<head>\r\n";
>print "\t<meta http-equiv=\"content-type\" content=\"text/html;
>charset=iso-8859-1\">\r\n";
>print "\t<link rel=\"stylesheet\" href=\"/display.css\">";
>print "\t<meta http-equiv=\"Pragma\" content=\"no-cache\">";
>print "\t<META HTTP-EQUIV=\"Refresh\" CONTENT=\"60\">";
>print "\t<title>My title</title>\r\n";
>print "</head>\r\n";
>print "<body>\r\n";
>---- CODE -----------
>
>Thanks!

As well as using heredoc you could just drop out of php

<?php
code
?>

<html>
<head>
<meta http-equiv=\"content-type\" content=\"text/html;
charset=iso-8859-1\">

more html

<?php
more code
?>

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация