Hi! I am creating site with php. On localhost all works well. On my hosting all looks good too, but on top of page i see "?>". In my code these symbols are absent.
What is this?
Hi! I am creating site with php. On localhost all works well. On my hosting all looks good too, but on top of page i see "?>". In my code these symbols are absent.
What is this?
Are you sure yu're seeing ?> and not something like >>? ?
Otherwise, this smells like a PHP-EndTag which was never opened...check your code.
It could be that your code uses short open tags (<? instead of <?php) and your hosting provider has short open tags turned off. That would mean, however, that your PHP code is not interpreted at all. It could also mean that your hosting provider doesn't support PHP at all, or only for certain file types.
Take a look into the page's source code to check whether that is the case.
The fact that you see that on top of the page could mean one or more things.
?>
outside of a php block<?
instead of long <?php and the host
has short tags turned offOut of these its most likely you have a closing ?> in your code without a corresponding open <?php tag
If you have a empty lines in your sourcefile before the opening <?php-tag, then those empty lines could get outputted unintenionally. If your script should start with <?php on top, remove all the empty lines above it.