开发者

php-cli outputs instead of executing

开发者 https://www.devze.com 2022-12-22 15:46 出处:网络
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.

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

精彩评论

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