Using Runhiddenconsole to launch Nginx and PHP under Windows
The RunHiddenConsole.exe function is to automatically close the script after executing the command line script, and the process that is opened from the script is not closed. In simple terms, the black form (cmd command form) does not appear, but programs that are running in the cmd command form are not closed, especially if some of the commands that hang the command form must be displayed are good, such as Tomcat, PHP, Nginx, and so on.
1, start Php and Nginx, according to their own environment settings php_home and Nginx_home, and then save as a. bat file pieces.
@echo off set php_home=./php/php-5.6.1-nts-win32-vc11-x64 set nginx_home=./nginx/nginx-1.7.4 rem Windows invalid REM Set php_fcgi_children=5 REM The maximum number of requests processed per process, or set to Windows environment variable set php_fcgi_max_requests=1000 echo starting PHP FastCGI ... Runhiddenconsole%php_home%/php-cgi.exe-b 127.0.0.1:9000-c%php_home%/php.ini echo starting nginx ... Runhiddenconsole%nginx_home%/nginx.exe-p%nginx_home%
2. Close PHP and Nginx
@echo off echo stopping nginx ... taskkill/f/im nginx.exe > nul echo stopping PHP FastCGI ... taskkill/f/im php-cgi.e Xe > Nul exit