PHP code ends with >


#1

I don’t know why, but on my site php code ends with >


#2

What do you mean? :slight_smile:


#3

PHP code usually ends with ?> but on my site it ends with >


#4

And site looks like this
https://ukrsocial.000webhostapp.com/


#5

Be sure to use
<?php to open
And
?> to close


#7

I think that you used a shortened php tag. And everything inside it is commented out.

The server probably does not accept shortened php tags. so like @ckhawand said, use <?php and ?> :smiley:


#8

My page is the same
everything between

<?php echo 'test daty' ?>

does not work and the browser sees as
<! -? Php
echo ‘date test’
->


#9

Try adding a semicolon( ; ) after ‘test daty’.


#10

You can enable short tags if you need.


#11

If I have a code

<?php echo 'test daty'; ?>

The website sees it as