Hi friends,
I keep Notepad++ with me in a pendrive and generally I use it in situation when I don't have access to my own system. It gives mes easy way to do small coding and modification. One thing I used to miss in it syntax error highlighting , though it is possible in NPP, not really fancy way but its there. So what you need to do is install NppExec plugin and then setup it to parse php to check errors.
Ofcourse you need to have PHP installed on your computer, easiest way is to install WAMP, XAMP like packages. So you should know where is your php.exe
Now following are the steps you need:
Step 1: Install NppExec PluginGoto -- > Plugins --> Plugin Manager --> Select "NppExec" and press INSTALL
Once its installed, you will need to restart Notepad plus plus.
Step 2: Configure NppExec PluginNow make sure you have proper path to your php.exe, for me it is :
D:\php\php.exe
Now Goto
Plugins --> NppExec --> Execute
In the box you see type following :
"D:\php\php.exe" "-ln" "$(FULL_CURRENT_PATH)"
Remember, to replace your actual php.exe path.
Now click save and give it name like run@php and done.
Step 3 : Test a codeNow, open any PHP file and test it by pressing :
Ctrl + F6You should see following message if there is any error in your php script:
"D:\php\php.exe" "-ln" "D:\docs\test\my.php"
Process started >>>
Parse error: syntax error, unexpected '.' in D:\docs\test\my.php on line 12
Errors parsing D:\docs\test\my.php
<<< Process finished.
================ READY ================
And you are done.
Note: You need to save your script before testing it.
If you have any question or suggestion then please feel to share here.