Although you have learned some Windows commands, you may not have tried using batch processing to interact with users and implement automatic shutdown. make a Shutdown program by yourself and feel different. next we will use the Windows batch
Note: Modify the values of several variables in the Start header.
Program code
Copy codeThe Code is as follows: SET NGINX_PATH = D:
SET NGINX_DIR = D: \ nginx-0.7.63 \
SET PHP_DIR = D: \ PHP \
++ Code
Cls
@ ECHO OFF
SET NGINX_PATH = D:
SET NGINX_DIR
In general, we use shutdown for shutdown and restart.
Usage: shutdown [/I |/l |/s |/r |/a |/p |/h |/e] [/f][/M \ computer] [/t xxx] [/d [p:] xx: yy [/c "comment"]
No parameter display help. This corresponds to the type /? Is the same/? Show Help.
Clear automatically started services
Displays the startup status of all running levels of all services# Chkconfig-listStop all services started on running level 3# For oldboy in 'chkconfig-list | grep 3: on | awk' {print $1} ''; do chkconfig-level 3
1. system environment variables after the user logs on to the system:$ Home user's own directory$ Path: the directory to be searched during Command Execution$ TZ Time Zone$ Mailcheck the number of seconds to check whether a new letter exists$ PS1
After the CentOS system is installed, it cannot be immediately used in the production environment. It usually needs to be optimized by our O & M personnel. Here are some basic optimization operations for Linux system installation. Note: This
Special symbols 1 and #1 in linux shell programming. comment a line in the script file. 2. The quotation marks and the \ symbol are not comments, but the # symbol itself: echo "12 # hehe" echo '12 # hehe 'echo 12 \ # hehe 3. Replace echo $ (PATH # *
Special characters in shell include:1. $ dollar sign2. \ backslash3. 'quotation marks4. Double quotation marks5. ,*,?, [,]The following is a one-to-one description.1. $ symbol
1. echo $? Displays the exit status of the previous command.2. echo "$?
Http://tech.foolpig.com/2008/07/09/linux-shell-char/
Shell string truncation problem:1. Linux Shell intercepts the first eight characters of the character variable by using the following methods:1. expr substr "$ A" 1 82. Echo $ A | awk '{print
Complete bat script:
@ Echo off
Color 1fThe title is monitoring xxxx.com.ECHO is monitoring xxxx.com...: AAASet STR = "0"Curl-s http://xxxx.com/checkxxxx.html> check.txtSet/p str = If not "% STR %" = "1 "(Echo at % date % time :~ 0, 5% cannot
On Error resume next
Set Arg = wscript. Arguments
If Arg. Count = 0 then wscript. Quit
'-------------------
'Enjoy it
'Code by netpatch
'-------------------
Fname = inputbox ("Enter the echo path):", "input file name", "% SystemRoot %/system32/webdl.
1. Basic syntaxPHP script blockStart?>To end, we can place the PHP script block anywhere in the document.Every PHP code must end with a semicolon
2. VariablesIn PHP, you do not need to declare the variable before setting it. You do not need to
strings and regular Expressions in PHP, PHP regular expressions
I. Characteristics of String types
1, PHP is a weakly typed language, other data types can be directly applied to string function operation.
1:
Output 345Output 345Look for Hello
String operations and regular expressionsString formatting;Concatenate and separate strings using string functions;String comparison;Use string functions to match and replace substrings;Use a regular expression;String formatting1. Space removal:
The specified URL cannot be found.
PHP page test.php is an upload page can be opened directly but accept upload to prompt the specified URL cannot be found. There is absolutely no error in the code!
Require_once dirname (__file__). ' /config.php ';
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.