Run php in cmd. Run the following command to indicate cmd.exe E: wampbinphpphp5.2.6php.exe. php1111 is used to obtain if ($ argv [1]) {$ _ GET [id] $ argv [1];} echo $ id $ _ GET [id] + 1; you can set. change php to your file and open the command prompt cmd.exe
E: wampbinphpphp5.2.6> php.exe a. php 11
11: pass parameters
Obtain
If ($ argv [1]) {
$ _ GET ['id'] = $ argv [1];
}
Echo $ id = $ _ GET [id] + 1;
You can change a. php to your file name. pay attention to the directory structure.
I use a. php directly because a. php and php.exe are in the same directory.
For convenience, you can also add the php installation directory to the environment variable PATH.
(Right-click my computer and choose Properties> Advanced> environment variables. If PATH exists, add your PHP installation directory to the original PATH. If PATH does not exist, create a new PATH)
After the environment variable is added, you do not need to enter the php installation directory in cmd.
Enter php.exe "a. php" (note that "a. php" must be in the directory where your cmd is running)
Dig command prompt cmd.exe E: wampbinphpphp5.2.6php.exe. for php 11 11, if ($ argv [1]) {$ _ GET ['id'] = $ argv [1];} echo $ id = $ _ GET [id] + 1; you can set. change php to your document...