You are here: Re: standard coding... « PHP Programming Language « IT news, forums, messages
Re: standard coding...

Posted by Linux Jay on 01/12/06 04:05

On 2006-01-12, Domestos <never.you@mind.com> wrote:
> for example... which is better or more standard....
>
><html>
><head>
><title>title text</title>
></head>
><body>
> You name is <?php $name?>
></body>
></html>
>
> saved as index.html
>
> or
>
>
><?php
> echo '<html>';
> echo '<head>';
> echo '<title>title text</title>';
> echo '</head>';
> echo '<body>';
> echo 'Your name is '.$name;
> echo '</body>';
> echo '</html>';
> ?>
>
> saved as index.php
>
Personally, in that example I'd use the first style of coding, and save it as
index.php

I have my servers set to only parse .php files for PHP code, so if I saved it
as a .html file it wouldn't work. It saves looking for PHP when there is none,
probably doesn't make much of a difference though.

--
J
My Realm: http://www.myrealm.co.uk/
LORE: http://lore.myrealm.co.uk/
'Drink up. The worlds about to end.'

 

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

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