Home > Backend Development > PHP Tutorial > 1.3-测试php解析

1.3-测试php解析

WBOY
Release: 2016-06-20 12:48:57
Original
978 people have browsed it

配置解析php

vim  /usr/local/nginx/conf/nginx.conf   //把下面的配置,前面的#删除,并更改fastcgi_param SCRIPT_FILENAME 那一行


        location ~ \.php$ {

            root           html;

            fastcgi_pass   127.0.0.1:9000;

            fastcgi_index  index.php;

            fastcgi_param  SCRIPT_FILENAME  /usr/local/nginx/html$fastcgi_script_name;

            include        fastcgi_params;

        }

复制代码

重新加载 /usr/local/nginx/sbin/nginx -s  reload


vim  /usr/local/nginx/html/1.php 

增加  

    phpinfo();

?>


测试: curl localhost/1.php 


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template