Home > Article > Development Tools > How to run php program in notepad
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.
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.
After the installation is completed, you can see the Chinese interface of Notepad.
Create a new php document with the following content. Output "Hello World".
Install the plug-in that compiles and runs the file. Plugin-Plugin Manager-Show Plugin Manager.
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.
Restart Notepad to complete the plug-in installation. Plug-in-NppExec-Execute, click Execute, or press F6 directly.
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.
After clicking OK, you can run the php program.
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!