PHP bug- code output as regular html text

Permalink
I try to edit block view.php page-list

When i put PHP code in the file - sometimes its wrote me a "HTML" code (in the preview mode i see the code as live text - without any error - just text)

<?php ? echo $thumb->src ?>

Output: src ?>

In the same file few line above $thumb->src give the Img src the URL (and its work).

Another Example - i wrote bad PHP code and its output as text:
<? echo $thumb = $iddddddddddh->get--+#+#Thumbnail($no-object, 400, 400, true-true-true); ?>

output this as text - inspect the html and this is the code
<!-- index.html -->
getThumbnail($idddmg, 400, 400, true);?>


Someone know this problem? (i check the <? open - and close ?>)

siton
 
WebcentricLtd replied on at Permalink Best Answer Reply
hi,
you most likely should not be using short tags

start your php with <?php and end with ?>

for example

<?php echo $myVariableName; ?>
pixelhero replied on at Permalink Reply
pixelhero
As Andy said. None of your examples are valid PHP code anyway, you have a random ? in the first example with no terminating semi-colon at the end of the line. the second example odds are you have short tags disabled so don't use them.