01.19.10
Setting up PHP to run your scripts inside EditpadPro
As mentioned in a previous post I am a fan of Editpadpro, it is now my text tool of choice, I find it very powerful, quick and easy to use. I have recently made an addition which is a nice little improvement. I set up an Editpadpro tool to run the current file as a php script and dump the output to a new file in Editpadpro. No more need to jump to your webbrowser and keep refreshing windows.
Follow the steps below to get this up and running.
- Create a new tool by going to Tools – Configure Tools – New
- Give it a name (I’ve called mine PHP File)
Set the options on the first screen
- Command line – path to php.exe and the %FILE% placeholder (places the current filename on command line).
- We must set the Working folder or any included files in your script wont be found. – use %Path% to set to the currently selected files path.
- Select any file type this should apply to probably just php.
If you wish ask Editpadpro to Save your current file to take advantage of any changes you might have made.
Now comes the fun bit,
- In the ‘How to capture the tool’s standard output’ select Into new tab to give us the output of our phpscript.
- Dump any error into the message pane.
This works a treat and for many text processing tasks I no longer need to go near a browser which makes me happy.