我已经安装好了nginx!php!php-fpm
但是在nginx/html里新建个index.php
内容:
<? echo "this is test"; ?>却不能再nginx上显示 this is test!!(就是不支持php语言!)他是全部显示出来的<? echo "this is test"; ?>谁能帮帮我!!如何配置nginx?

解决方案 »

  1.   

    参考这个:
    http://www.jb51.net/article/20456.htm
      

  2.   

    改成 
    <?php …… ?>
      

  3.   

    +

    php.ini
    short_open_tag = On
      

  4.   

    1. 设置nginx的配置文件,添加php项,这个最好看官方教程,比较标准2. 装fastCGI或php-fpm,并配置。
      

  5.   

    我已经安装好了nginx!php!php-fpm
    -----------------要配置php-fpm, 就是用fastCGI去调用php。
      

  6.   

    你得配fcgi,nginx的配置文件改了吗?php-fpm服务启了吗?
    nginx ->fcgi-> php-fpm,中间用fcgi连接
    nginx/html目录下是放静态文件的,你多研究以下nginx吧