Reputation: 187
My web host's PHP engine is taking everything outside <?php ?> and replacing line breaks with <br>, like so:
<?php
echo 'php1';
?>
Hello
world
<?php
echo 'php2';
?>
The output I get is:
php1
<br><br>Hello<br>world<br><br>php2
All of the other servers I use do this, which is what I want:
php1
Hello
world
php2
Can I disable this behaviour?
Upvotes: 1
Views: 119
Reputation: 385144
As far as I can tell, there is no PHP .ini
directive to do this.
Contact your webhost and ask them about it, but I suspect that something else is up here.
Upvotes: 1
Reputation: 1203
Try this, your host is very wierd
<?php
echo 'php1';
?>
Hello
world
<?php
echo 'php2';
?>
Upvotes: 0
Reputation: 12418
Try setting the header to Content-Type: text/plain and see if that helps
<?php
header('Content-Type: text/plain');
?>
Upvotes: 0