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)
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:
output this as text - inspect the html and this is the code
Someone know this problem? (i check the <? open - and close ?>)
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 ?>)
you most likely should not be using short tags
start your php with <?php and end with ?>
for example
<?php echo $myVariableName; ?>