Home  >  Article  >  Development Tools  >  How to run php program in notepad

How to run php program in notepad

(*-*)浩
(*-*)浩Original
2019-05-17 11:51:1013552browse

How to run php program in notepad: first install notepad and create a new php document; then write a php program that outputs "Hello World"; then install a plug-in that compiles and runs the file; finally enter "cd" in the command input window $(CURRENT_DIRECTORY)" command.

How to run php program in notepad

You may not know how to use Notepad to compile and run PHP? Today I will give you a detailed explanation of the specific operations of using Notepad to compile and run PHP. I hope It can help everyone.

Method/Step

Install notepad, select the default settings, and click the next step. You can choose the installation path.

How to run php program in notepad

After the installation is completed, you can see the Chinese interface of Notepad.

How to run php program in notepad

Create a new php document with the following content. Output "Hello World".

How to run php program in notepad

Install the plug-in that compiles and runs the file. Plugin-Plugin Manager-Show Plugin Manager.

How to run php program in notepad

Find the NppExec plug-in. Judging from the name of this plug-in, it is the execution of each file. Click Install. It needs to be downloaded and installed. If it fails, it may be because the network is not good. Just try again a few times. How to run php program in notepad

Restart Notepad to complete the plug-in installation. Plug-in-NppExec-Execute, click Execute, or press F6 directly. How to run php program in notepad

Enter the command in the pop-up command input window:

cd $(CURRENT_DIRECTORY)

D:\AppServ\php5\php.exe$(FULL_CURRENT_PATH )

The meaning of the command is to enter the current file directory and use the installed php.exe file to run the file. D:\AppServ\php5\php.exe is the installation path of php.

How to run php program in notepad

After clicking OK, you can run the php program.

How to run php program in notepad

The above is the detailed content of How to run php program in notepad. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn