Installing PHP on Windows: if PHP pages work but phpinfo is blank?
When installing PHP on IIS, I ran into this: in general, php files worked, but phpinfo.php files were not. They were blank when browsed.
The problem was I had left out the “php” in the opening tag:
where I should have used:
The first example will work only if short tags are enabled in php.in configuration file. There are reasons NOT to use this, as described in the comments in a standard php.ini file:
; Allow the <? tag. Otherwise, only <?php and <script> tags are recognized. ; NOTE: Using short tags should be avoided when developing applications or ; libraries that are meant for redistribution, or deployment on PHP ; servers which are not under your control, because short tags may not ; be supported on the target server. For portable, redistributable code, ; be sure not to use short tags. short_open_tag = On