This article mainly introduces how to use PHP to start windows applications, execute bat batch processing, and execute cmd commands (exec and system functions). For more information, see
This article mainly introduces how to use PHP to start windows applications, execute bat batch processing, and execute cmd commands (
As we all know, the cmd command line code under Windows is the encoding of the Windows system, that is, ANSI encoding or GBK encoding, so many of the applications we write, such as PHP to write utf-8 coded applications run under the command line will appear garbled, The reason is because the coding of the running environment uses its own encoding to resolve the p
First, make it clear:
All modifications to environment variables under the cmd command line are onlyCurrent windowValid, not permanent modification. That is to say, when the cmd command line window is closed, it will no longer work. There are two ways to permanently modify environment variables: one is to directly modify the Registry (this method has not been tested yet), and the other is through my compute
#-*-Coding:utf-8-*-# python:2.x__author__ = ' Administrator 'Import Ctypes,sysStd_input_handle=-10Std_output_handle=-11Std_errir_handle=-12#定义字体颜色, because of color coding, is composed of 2 hexadecimal, married 0~f, the former refers to the background color, the latter is the font color#因为由于函数限制, there are only 16 colors that can be combined with the front and back color, or you can mix other colors# Windows cmd
Implementation of PHP running under Windows command-line cmd
In Windows cmd, you can execute PHP files through Php.exe, and then write this command to bat to execute it regularly, probably more reliable than when the browser is refreshed. The code is as follows:
Php.exe the path of the PHP file where you want to exe
Windows 7 cmd common commands:1. Enter a disk, e.g. D:(with a colon) 2. Display the folder and file of D drive:dir3. Enter a folder on the D drive:CD filename4. Clear the screen:CLS5. View IP configuration: ipconfig [/all]6. ping-n Send request URL----> ping-n 3 www.rui.com7. Check Port condition: Netstat-an8. Exit: exitFor more CMD commands, refer to the followi
When Python2 and Python3 are installed at the same time in the computer, it is often the need to switch versions. So how do you do it with the cmd command line?Method: Modify the file name of the Python.exeGive me a chestnut:Both py2.7.10 and python3.4.3 are installed in My computer, and the following paths are added to the path path of the system environment variable, which is configured with the environment variables:E:\python2.7.10_64\;E:\python2.7
In WindowsProgramAll are done by clicking the mouse, but the following are the file names of various property pages in windows, which can be directly executed through "run.
Run the program to run the command
Auxiliary Function option access. CPL
Add hardware wizard hdwwiz. CPL
Appwiz. CPL
Management Tool Control admintools
Automatically update wuaucpl. CPL
Bluetooth File Transfer wizard fsquirt
Calculator calc
Certificate Manage
Take Window7 as an example, to jump to the I:\adt-bundle-windows-x86-20130219\sdk\platform-tools directory.1. Open the CMD Command window in the run as shown in:2, enter the letter I:, press ENTER can be, so jump to the I disk. As shown in.3. Input command, "CD adt-bundle-windows-x86-20130219\sdk\platform-tools"4, enter can, see the directory has jumped to "I:\ad
Linux is not a problem at all, but it is cumbersome under the Windows operating system.
The environment variable needs to be added path path: C:\Program Files (x86) \postgresql\9.3\bin
Add postgres System User: Computer------Local Users and Groups--add user-->postgres User, add password.
CMD after entry command format:->runas/user:postgres SQLEnter passwordfinish!
Tag: Python's raw_input statement contains a workaround for displaying garbled characters in Windows environment cmdPython's raw_input statement, if it contains Chinese, is garbled when executed in Windows environment cmd:650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6E/D3/wKiom1WJF4-T9iPhAAHHl9Wr_hw317.jpg "title=" 1.png " alt= "Wkiom1wjf4-t9iphaahh
This article mainly introduces how to use PHP to start windows applications, execute bat batch processing, and execute cmd commands (exec and system functions). For more information, see
Exec or system can call the cmd command.
Directly run the code:
The code is as follows:
/** Open the windows calculator */Exec ('S
content displayed may not be completely. To minimize and then maximize the command line form, the contents of the file are fully displayed. ++++++++++++++++++++++++++++++++++++chcp with command:Features: Show or set the active code page numberCHCP [nnn]nnn Specifies the code page number.do not add a number type CHCP displays the active code page number.nnn Specifies an existing system character set. The character set is defined in the Config.sys file by the country command.The code page can be
Under Windows cmd, you can execute PHP files by Php.exe, and then write the command to bat to execute it regularly, probably more reliably than the browser's timed refresh.
The path to the Php.exe and the path to the PHP file to execute (code below):
D:program Fileswampbinphpphp5.4.6php.exe D:program fileswampwwwphpinfo.php
Saved as a bat file, you can take advantage of the scheduled tasks of
Under Windows cmd, you can execute PHP files by Php.exe, and then write the command to bat to execute it regularly, probably more reliably than the browser's timed refresh.
The path to the Php.exe and the path to the PHP file to execute (code below):
D:\Program Files\wamp\bin\php\php5.4.6\php.exe D:\Program files\wamp\www\phpinfo.php
Saved as a bat file, you can take advantage of the scheduled tasks of
Requirements Description :At work, sometimes it is necessary to switch the drive letter in Cmd, there are always some times beforeThrough the CD to cut, is to switch not over, each time to carry out Baidu query, so this time on record,Save it for later.Operation Process :1. Go to the cmd command line by Win+r->cmd2. Switch to a different disk root by using the disk multibyte colon, for example: Switch to D,
1. Write good C # source files (. cs).2. Find the C # compiler csc.exe that comes with the window, and the general path is C:\Windows\Microsoft.NET\Framework\v4.0.30319 or C:\Windows\Microsoft.NET \framework64\v4.0.30319 3. Run cmd as Administrator, or you will receive an error denying access to the resource. Then run the following command to compile.4. You can
This article mainly introduces how to use PHP to start windows applications, execute bat batch processing, and execute cmd commands (exec and system functions). For more information, see
Exec or system can call the cmd command.
Directly run the code:
The code is as follows:
/** Open the windows calculator */Exec ('St
Start-run--cmd Enter the command prompt to enter Netstat-ano to see all the connected PID after the PID in the task Manager to find the corresponding program if the Task Manager does not have the pid , you can select the Task Manager "View"-"Select column"Often, we start the application when the system needs to find the port is occupied by other programs, how to know who owns the port we need, a lot of people are more headache, the following is a very
The windows cmd or batch processing command does not support space solution (1) with quotation marks, indicating a complete path, which is often used in many server batch processing such as jboss and tomcat. Set JAVA_HOME = C: \ Program Files \ Java \ jdk1.5.0 _ 12 set EXE_JAVA = "% JAVA_HOME %" \ bin \ java % EXE_JAVA %-version (2) to a short path, I think this is the best solution. Set JAVA_HOME = C: \ Pr
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.