Re: Comment modes behavior in HTML and PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sa, Jul 28, 2007 at 03:40:07 +0100, C.R.Vegelin wrote:
> I have a PHP script, as follows:
> <!--
>    <?php
>        echo "should this be echoed ?";
>    ?>
> -->
> 
> As expected, the browser shows nothing,
> but when I view Source in the browser, I see:
> <!-- start HTML comment
>  should this be echoed ?-->
> 
> Shouldn't it be just: <!--  -->, without the echo result ?
> I don't expect PHP to be active between <!--     -->.


No, you're expecting something wrong.

A <!-- ... is a HTML Comment which has nothing to do with the 
PHP Script execution on server side. Server sided php 
code execution is only bound to <? indicators.

> 
> TIA, Cor

So far.
Rob

-- 
Robert Patrick Degen

    pgp-publickey   http://www-users.rwth-aachen.de/robert.degen/publickey.asc
           e-mail   Robert.Degen@xxxxxxxxxxxxxx
         cellular   0049 - 176 - 22 08 95 01
          private   0049 - 241 - 966 18 72

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux