开发者

php-cli outputs instead of executing

Im using Debian testing, i have installed php-cli a开发者_运维知识库nd when i try to execute a php script it output the source instead of executing it.

Example:

 php test.php
 <?
 phpinfo();
 ?>

any ideas how to fix this behavior, i tried reinstalling and purging no results.


Find following line in your php.ini file: short_open_tag = Off

And change it to: short_open_tag = On


Change <? to <?php. Short tags must not be enabled.


Looks like you have short_open_tag turned off.

Either change that configuration option or, preferably, use the full opening tag: <?php

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜