How To Dynamic Web Rendering?

Adam D. Ruppe destructionator at gmail.com
Sun May 15 09:17:49 PDT 2011


Alexander wrote:
> page-a.html:
> <?d var = "value" ?>
> page-b.html:
> <?= var ?>
>
> And this I expect to work.

That doesn't work in PHP nor ASP. In them, you *must* have page-a
include page-b, or a parent page include both, unless you are
populating the var from the session (see below).

Try it. It's identical to dhp's preprocessor approach.

> *and* persistent.

That never works in PHP nor ASP, not even with php's
register_globals. You have to use an explicit session to keep
variables around between calls.

Note that PHP's register_globals, if you're actually using it,
is a huge huge mistake that they've deprecated in new versions.


More information about the Digitalmars-d-learn mailing list