available php Opening and Closing Tags

PHP documentation states:

<%= $variable; # This is a shortcut for "<% echo . . ." %>

<?= expression ?> This is a shortcut for "<? echo expression ?>"

...short tags and ASP style tags, and can be turned on and off from the php.ini configuration file.

So I attempted to try out the "shortcuts" for ASP style tags and short tags to verify these statements. I got this:

Parse error: syntax error, unexpected 'echo' (T_ECHO) in C:UsersRobertDocumentsweb developmentxampphtdocsxamppweb_developmentnew_studyone.php on line 2

On a simple line of code as this:

<%= echo "tom" %>

and this

<?= echo "tom" ?>

Does anyone know why this is the case?


代码应该是

<%= "tom" %>
链接地址: http://www.djcxy.com/p/10188.html

上一篇: PHP评论#vs //

下一篇: 可用的PHP打开和关闭标签