OKdevTV Docs
Home OKdevTV
ESC
php 1 min read 1.1 KB Raw Markdown
On this page (7)

php

php for windows

config

  • conf/nginx.conf
text
location / {
    root   html;
    index  index.html index.htm index.php;
}
  • Uncomment and change to nginx home path
text
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
    root           html;
    fastcgi_pass   127.0.0.1:9000;
    fastcgi_index  index.php;
    fastcgi_param  SCRIPT_FILENAME  D:/dev/nginx-1.13.4/html$fastcgi_script_name;
    include        fastcgi_params;
}

start

text
start nginx
text
php-cgi.exe -b 127.0.0.1:9000

check process

text
tasklist /fi "imagename eq nginx.exe"
  • stop
text
nginx -s stop
  • close php-cgi.exe window

Reserved Keywords

  • Read Environment Variables
text
$_ENV["USER"]
  • Web root path
text
$_SERVER['DOCUMENT_ROOT']

function

ref