Background
Often Daoteng system, hovering on the convenience of Windows and the magic of Linux, once the toss system basic configuration is to be re-located, hereby record the Nginx PHP basic start, restart and exit
Online experience
Online This kind of thing a lot of search, there are many scripts, such as the following:
@echo offtaskkill /F /IM nginx.exe > nul
Like, it's not "classy".
Another way
I will not write batch, try a few words are not right, brainwave use a shortcut, command line tool Run command is not a call to the program, you can:
- Create shortcut, Connection object is nginx.exe under any path
- Change the "target" in the properties of the shortcut, restart at the back plus
-s reload , exit at the back plus -s quit , start without adding or adding what you need
PHP does not use this method, or batch processing:
@echo offecho Starting PHP FastCGI...d:\applications\php\php-cgi.exe -b 127.0.0.1:9000 -c d:\applications\php\php-dev.ini
@echo offecho Stopping PHP...taskkill /F /IM php-cgi.exe > nulexit
Advantages and Disadvantages
Personal feeling shortcuts are more intuitive under Windows, and you can consider using
Configure Nginx + PHP under Windows