XAMPP does not parse PHP

I just installed XAMPP 1.8.1 and restarted my computer, started running Apache and MySQL and created a test file in the test folder in my htdocs directory under XAMPP.

When I go to xampp / index.php, their page looks fine. But my test file only returns the actual characters in my PHP file on the Response tab in firebug, but a completely blank white screen in the window. The file is definitely a .php extension - can anyone help?

The crazy thing: I had it 6 months ago, and I just returned to it on a new installation.

+4
source share
1 answer

I think you can use the short tag <? ?> <? ?> or <?= ?> instead of <?php ?> .
Check php.ini . It is located in \ path \ to \ xampp \ php \ php.ini . short_open_tag must be On

; Allow tag <? . Otherwise, only the <?php and <script> tags are recognized.
; NOTE. Short tags should be avoided when developing applications or; libraries designed for redistribution or deployment in PHP
; servers that are not under your control, because short tags may not be displayed; be supported on the target server. For portable, redistributable code, be sure to use short tags.
short_open_tag = On

+17
source

All Articles