I have new sample.php file that is it active on a cpanel (Apache server) and it is work correctly on that cpanel, I don't know how it is working! because it is PHP file but it is using <%
instead of <?PHP
in it's php syntax and %>
instead of ?>
and <%=
instead of <?PHP echo
.
can you tell me what is the <% and how I can enable it in my cpanel?
what is the <% in the php files and how it should compile?
158 views Asked by Reza Amya At
1
<%
are called "asp-style tags".If you have access to the php.ini, set
asp_tags = Off
orasp_tags = 0
toasp_tags = On
orasp_tags = 1
respectively.To temporarily enable asp-tags for a script, you can add
<?php ini_set('asp_tags',1) ?>
to the beginning of the file, but this is less than ideal.The alternative would be to replace each
<%
with<?php
and each%>
with?>
. If you are using short_tags, you can replace<%
,%>,
and<%=
with<?
,?>
, and<?=
, respectively.