Server-Side magazine interview, touches on D

Nick Sabalausky a at a.a
Mon Jan 30 15:17:02 PST 2012


"Jesse Phillips" <jessekphillips+D at gmail.com> wrote in message 
news:ictwgryawpavhnrnqawa at dfeed.kimsufi.thecybershadow.net...
> On Sunday, 29 January 2012 at 23:25:36 UTC, Nick Sabalausky wrote:
>> The whole industry's moved over keeping server-side code out of the HTML
>
> So the whole industry has moved away from php?

I wish! No, it's moved away from using PHP in an ASP-classic-style. Ie, 
scattering a bunch of <?php ... ?> throughout an HTML document.

> Sure templating is used so mixing php and html is as common, but if I'm 
> not mistaken <? is still ?> used a lot, I don't know how to use PHP 
> without it.
>

Typically now, a PHP file will start with "<?php" to turn on "PHP-mode", and 
then it'll just leave PHP-mode on for the rest of the file. It won't even be 
closed with "?>" - this ensures no stray whitespace is printed, which can 
screw things up (for instance, if you're expecting that HTTP headers are not 
to have been sent yet.)




More information about the Digitalmars-d-announce mailing list