I have a little problem. After installed xampp on localhost I saw, that my PHP doesn't accept <?
. When I have only <?
it will show me error:
Parse error: syntax error, unexpected end of file in D:\xampp\htdocs\admin.php on line 1113.
On my web server it works well. But when I replace <?
to <?php
, it works on localhost too. I have a lot of files with just a <?
and don't have enough time to replace every <?
. Is here any way to allow only <?
on localhost?
your question is not full, but if i understood correctly, it's not accepting the <?php
you can change the behavior in php.ini ---> short_opentag=On
but my advice is to always use the <?php tag
. sorry if this is not what you are asking for but this is what I understood from the title of the question.
You are experiencing the pain of short tags.
Your best bet is to stop using them as you might end up using hosting which has them turned on in the future.
You can configure PHP to support them if you really want to though.
you probably have to check your php.ini there is one parameter short_open_tag
tells php to recognize <?
as php code beginning tag or not, here is some more information about this param: