This section describes how to execute the PHP script code in the command line. The actual purpose is to use php.exe. therefore, pay attention to setting environment variables. Create a simple text file that contains the following PHP code and save it as hello. php:
The code is as follows:
Echo "Hello from the CLI ";?>
Now, try to run this program at the command
MainParameters can be used in the method. In this case, they take one of the following forms:
Static IntMain (String[] ARGs)
static void main ( string [] ARGs)
To use Windows FormsProgramInMainTo enable the command line parameters in the method, you must manually modify the parameters in program. CS.Main. TheCodeCreateMain. You can also useEnvironment..::.CommandLineOrEnvironment..::.Getcomman
This article for you to share some of the common commands under the PHP command line, the need for friends can refer to
1 php-mDisplay the modules compiled into the kernel
2 Php-vShow PHP Version number
3 PHP--iniShow Profile Name
4 php-hShows which command-line commands are available
5 PHP--infoView class/functio
#include int main (intChar *argv[]) { int0 ; for 0; i ) { printf ("%s\n", Argv[i]); } return 0 ;}1. DescriptionIn the above codeARGC represents the number of command-line arguments when starting a program, the C + + language specifies that the executable program itself's file name is also a comman
.
Coverage.last_good_run.ok
You can use the Run–parallel-mode parameter to control whether the parameter independent result file is run each time, if specified, the resulting file name Machine name, process ID, and random number. For example
. Coverage. neds-macbook-pro.local.88335.316857
. Coverage. geometer.8044.799674
If you run coverage on different machines and the resulting file cannot be merged, you can use the paths parameter to indicate the difference between them. Speci
path, taking the final element inthe path to be the app name.For example: revel new import/path/helloworld,}
The name function reads the command name from Usageline, for example: Run,new, and so on.
Commands is an array of *command types that stores *command for all commands, such as cmdnew, which is defined in the New.go file, noting that the value of the
parameters are explained as follows:Name or Flags: command-line parameter name or option, such as-P,--portActionStore: Default action mode, store value to specified variableStore_const: Store values specified in the const section of the parameter, commonly used to implement non-Boolean command-line flagStore_true/stor
command, the result is output in Long Mode:
[Root @ ay1301_135131135089 logs] # ls-l
Total 8
-Rw-1 root 5975 Jun 15 :34 boot2013-06.log
Show Hidden Files:
[Root @ ay1301_135131135089 logs] # ls-
... Boot2013-06.log
Command Option Parameters
Command-options arguments
In the following example, the ls
log:tail-f/usr/local/apache/logs/error_log.Two command-line instances of executing CGI scripts1)To invoke the CGI script by post:$ echo -n ‘a=b;c=d‘ | REQUEST_METHOD=POST CONTENT_LENGTH=999 perl index.cgiTo invoke a CGI script by a Get method:$ perl index.cgi ‘a=b;c=d‘2)For example, with the following program (notice of the -debug arguments to use CGI )#! /usr/b
, try it!Ctrl+b shortcut keysThe b here can be understood as backward, backwards meaning. Sometimes on the command line, we write the arguments or paths of a command incorrectly, and the general practice is to use the left arrow to move the cursor to the specified position and modify it. In fact, we can use the ctrl+b
Java command line program build tool-airline
In the past, I used to develop Java command line programs. I had a lot of trouble parsing parameters and some help information, today, when studying the interface test, I accidentally discovered a tool that allows you to quickly build a
VC 6.0You can set command-line parameters in the IDE and run them again. The procedure is as follows:Select the settings of the Project drop-down menu ... The following window appears, select the Debug tab on the right, then fill in the relevant command line parameters in program a
You can usually start a program by double-clicking the Unity icon on the desktop, but you can also run the program from the command line (for example, MacOS Terminal or Windows Command Window). If you start Unity this way, it will be able to accept startup commands and information, which will be very helpful for test suites, automated builds, and other authoring
One, Java and Javac command line(1) Javac command lineJavac.exe for compiling Java source files, generating. class filesSyntax: javac [option] SourceCommon [option] options:A,-classpath Will overwrite the classpath settingsB,-D (2) Java command lineJava.exe used to run the. class file generated after Javac compilationS
Php script (with parameters) running on the PHP command line
Echo "Hello from the CLI ";
?>
Now, try to run this program at the command line prompt by calling the CLI executable file and providing the Script File name: # php phphphello. php outputs Hello from the CLIWith stand
Create a simple text file that contains the following PHP code and save it as hello. php:Copy codeThe Code is as follows:Echo "Hello from the CLI ";?> Now, try to run this program at the command line prompt by calling the CLI executable file and providing the script file name:# Php phphello. phpOutput Hello from the CLIUse Standard Input and OutputYou can use these three constants in your PHP script to acce
1. Main function Parameter formint Main (int.Char char *env[]); // the first parameter, ARGC, represents the number of arguments on a command line // The second parameter points to each parameter in turn, such as "Ls-l", argv[0] to "LS", argv[1] to "-L", argv[2] to null // The third parameter is a list of current process environment variables2,
Sys. argv []
List of strings containing command line parameters. Obtain the parameters by subscript.
For example:
#!/usr/bin/python# Filename: using_sys.py import sys print 'The command line arguments are:'for i in sys.argv: print i print '\n\nThe PYTHONPATH is', sy
resolved. Started HTTP Server on port 8000Server are ready.Next, you can access the view through the browser. Http://localhost:8000/.(3) Jinfo3.1 EffectsThe configuration information that is generated. If the specified process is running on a 64-bit JVM, you may need to specify the-J-D64 option3.2 Usejinfo [option] pidjinfo [option] executable corejinfo [option] [Servier-id] Remote-hostname-or-ip3.3 Option ParametersNo-option: Both the command
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.