Here’s the question. I have some kind of php script. and then html
like this:
<?
foreach($_POST as $name=>$val){
$body .= $name." : ".$val."\n";
}
mail("someemail@e.com","title",$body);
}
?>
So, when this code executes successfully, everything is fine.
But when code does not execute(for example if I do not have smtp server), then I got this on my html page: $val){ $body .= $name." : ".$val."\n"; } mail("someemail@e.com","title",$body); } ?>
How do I hide this code, so it does not show on my page?
Thanks.
It’s possible that the server does not have the short opening tag enabled.
At the top of the file, use
<?phpinstead of just<?.You should do this in any case where you do not control the server that your code will run on.