POV-Ray : Newsgroups : povray.off-topic : Lamp me one : Re: Lamp me one Server Time
10 Oct 2024 21:13:30 EDT (-0400)
  Re: Lamp me one  
From: Invisible
Date: 5 Feb 2008 10:45:35
Message: <47a8849f$1@news.povray.org>
Warp wrote:

>>>   Don't mix HTML and PHP. That's just asking for maintenance nightmares.
> 
>> I thought that was the design goal of PHP?
> 
>   Maybe it was, but in practice it's usually a bad idea. I have seen
> horrible, horrible examples.

I can imagine...

The PHP tutorial explains how you can do "really cool" things like this:

<?php if ($somecondition) { ?>

Lots of HTML here...

<?php } else { ?>

lots more HTML here...

<?php } ?>

Which... uh... well I can imagine it becoming messy quite fast.

>   This may be an acceptable exception:
> 
> <?php
>   ... lots of PHP code here
> ?>
> 
> <html>
> ...
>   <?php (something which calls the code above) ?>
> ...
> </html>

Yeah, that seems more like the model to follow. (In fact, some of the 
user comments I've seen suggest that all the "real code" should be in 
include files instead and just called from the HTML pages.)

>>>   You don't need to make a separate 'echo' for each of those things.
> 
>> You do if you only have a 40x40 character text window and a text editor 
>> which malfunctions on long lines...
> 
>   No you don't:
> 
> echo
>  'hello ' .
>  $user .
>  ", how are you?\n";

Ooo... you can do that?

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.