|
php Editor Review PLEASE NOTE -- THIS PAGE IS OBSOLETE -- CHECK THE NEW PAGE FOR UPDATED INFORMATION. ANY DOWNLOAD LINKS MAY EITHER BE INOPERATIVE OR DOWNLOAD OBSOLETE PRODUCT VERSIONS. IT HAS BEEN LEFT POSTED FOR: 1) THOSE WHO WANT TO REFERENCE INFORMATION DELETED FROM THE NEW PAGE 2) THOSE WHO MAY HAVE BOOKMARKED THIS PAGE. If you've never heard of PHP, it's a scripting language that allows you to make web pages based on information in a database. Most of the pages and images on The Shareware Genie website are created using PHP. This is not, however, meant to be a PHP tutorial, but to explain some of the better features of the editor. No editor will do the programming for you but the right one will help novices to learn the language and make things easier for experienced programmers. For PHP, this IS the editor you want. The last editor I was using didn't do much more than change the color of the php code so when I missed one of the closing braces, it offered NO help with finding the error. I hesitated to load and use this program; after all, who wants to take the time to learn a new editor when you're in a hurry? I decided to give it a try and in 15 minutes I was up to speed and ready to delete my old editor for good. Intuitive, full of features, great help files; this is what an editor should be. This editor also has the advantage of working very well with Web Effects and the other programs in the Creative Suite. You may want to download the php Editor, install it and follow along. Let's take a look The Basics
The editor window is split in to 3 frames; the main frame where most of the editing is done, the "Info pane", located on the lower left and the "Project Pane" located on the lower right. Most of the basic features on the top menu bar control what goes into the main or editor frame. These features are fairly simple so I won't go into much detail. The top menu bar has options such as brace matching, find and replace, special symbols, undo/redo, all of the standard HTML formatting, bookmarking lines of code, color selection, and an incredible selection of help files.
Code Assistance (F1) Having information immediately available is a big help when coding. Regardless of how much you know, there's always something else you have to find out. The php Editor can give you help in three ways. 1) The help menu Click on the help menu, then "PHP manual, reference and tutorial" (or hit "F1)"and a complete reference taken from the php.net site will open. This is a very complete reference so you will have to look around to find specific information 2) Specific Commands If you want help on a specific command such as "str_replace", highlight the entire command and hit "F1". The same window will appear as above but you will be brought to the page on "str_replace". 3) Parameter list This is a real help when you're dealing with complicated commands. One that I use on images, ImageTTFText has EIGHT parameters! I don't know about anyone else, but before I used this editor, I was always forgetting which one goes where. Now you merely type the command and the first brace, ImageTTFText( , and the editor displays the entire list of parameters. Syntax Checking One click syntax checking by itself makes this editor worth the registration fee. The program does this by using php.exe and interpreting the output. This means that you have to have Apache and PHP installed on your PC; both are open source (that means free!) and easy to install. Apache2Triad which includes PHP, Apache Server and MySQL database can be downloaded from the php site. For more help, go to Help / PHP Manual in the php editor menu, and check "Getting Started / A simple tutorial / What do I need". To test this feature out: 1) Select Date and Time in the projects pane in the lower right then open time.php 2) The first line reads "function date_dk($format, $timestamp = false)" - delete the last brace ")" and save the program. 3) Use the slider on the right side to move the page down so you can no longer see the first line. 4) From the "build" button on the menu, select "Check Syntax" or just hit "F7". 5) The info pane at the lower left will automatically change to the output tab and following message will appear: 6) Hit the "F4" button and you will be brought to the error location. 7) Replace the brace ")" , save the program and hit "F7". The message will now say that no syntax errors were detected. File Navigation Navigation is usally only one click away so you don't have to spend your time hunting around. Four ways of navigation are: 1) Bookmarks The four bookmark tabs on the top menu allow you to mark code location and jump between these marks. Simply set a bookmark to save a place then use the next and last bookmark commands to navigate between them. Another menu button will delete the bookmark when you're done. 2)Function tab in the Info Window There are three tabs on the Info Window located at the bottom left of the php editor. Clicking on the Fuction tab will bring up a list of functions in the file you're presently working on. The ones shown below are from the time.php file mentioned earlier. Double clicking on a function will move the cursor to the start of that function. 3) File Tabs When moving between files, simply click on the tab with the file name on it to bring it into the editor window. 4) Working directory in the Info Window The "Working Directory" tab on the Info Window will list all of the php files in the directory of your choice. Open any of the php files in the editor by double-clicking. Non php files can be opened in the app of your choice by selecting the "Open in Native Application" selection in the right click pop up menu. Reusable Code One thing that I noticed when I first tried this editor is that there was no support for database commands; then I discovered Code Templates. Access the code templates by clicking on this icon in the top menu bar: That will open a window with a list of saved code templates you can use. Click on any of the choices and the corresponding code will be printed in the editor window. For example, selecting "if" from the menu will type the following in the editor window: if (©) { } You can also just type "if" and hit Ctrl-Space. This will bring up a menu with all of the code templates starting with "if". In this case, the choices are "if" and "if-else". Selecting "if" from the pop up menu will print the same code as above with the cursor where the © symbol is. Adding your own code is easy. For an example, I'll add three common PHP commands for mysql functions. 1) Select the manage template button: Which brings up the "Manage Code Templates" window. Click on the "New" button. 2) Name your new code in the pop up box. In this case, I've typed "mysql Fetch Row" 3) Now type in the code for the template in the bottom box of the Manage Code Templates window; it should be blank. Here, I typed in the command for mysql_fetch_row using arbitrary variable for the acquired row and the query result or "$row = mysql_fetch_row($FormInfoID)" 4) I repeated the above procedure two more times and added templates called "mysql Query" and "mysql_connect". By typing in mysql and hitting Ctrl-Space, the following menu comes up. Selecting "mysql Fetch Row" will print out "$row = mysql_fetch_row($FormInfoID)". This is very useful but sometimes you want to add your own variable names and values. The code template allows you to change the code template properties BEFORE you put it in the editor. For an example: 1) Open the Manage Code Templates window. 2) Assuming you added it in the above example, select "mysql Fetch Row" from the template names box. 3) In the template code box, overwrite "$row = mysql_fetch_row($FormInfoID)" with this: [["RowName", "Edit", "", "$row"] ["QueryResult", "Edit", "", "$FormInfoID"]] [RowName]= mysql_fetch_row([QueryResult]) 4) Close the Manage Code Templates window, type "mysql" in the editor window and push Ctrl-Space. 5) Select "mysql Fetch Row" and now the following box will appear: You can now specify the names of the variables. Type in different names for the variable and press the "OK" button. The code will print with the new variable names. Check out the help files under "code templates" if you want more information. Project Pane Code templates are good for smaller bits of code that you want to reuse but for larger pieces of code, you should use the Project Pane. Located on the lower right of the editor, the project pane is an easy place to access template files or large sections of code you might want to access. To access the files, just double click on one of the entries in the window. To add your own files to this window: 1) Go to the root directory of the php editor - the default is ProgramFiles/PHPed/ and go to the "Solutions" folder. 2) If you create a new folder in this directory, it will create new category with the same name as the file in the Project Pane. 3) Place any php file in new or existing folders and they can be accessed from the Project Pane. The Solutions folder contains a readme text file for more information. View Results Usually you'd like to check to see if your code actually works. Aside from Syntax Checking, there are three ways to view your results. All of thse commands can be found in the "build" selection of the top menu 1) Run This option will check to see if your process runs but won't show you much. What you will see is a dos (or command line) box open and shut quickly. 2) Run through console If you actually want to see some text output from your program, use the "Run Through Console" command. This will automatically change the Info Window tab to "Output" and display any text output your program will generate. This option is for text output only; trying to display graphics or user input will crash the editor. 3)View in Browser This will display the output in a browser. The default is Internet Explorer but you can use the tools option to use other browsers. Conclusion and Registration My purpose here is not to rewrite the user's manual but to give you an idea of the many features that the php Editor has. Although there are many features I didn't mention, I hope this has given you an idea of what the php Editor can do. If you want to learn more about integrating other tools, VB Script macros, and many more features, download this program and take advantage of the free evaluation period. Registration of the PHP Editor can be done by clicking on the "Order Now" button from the pop up that appears when the program starts. If you're looking for a better deal, check out the Creative Suite Subscription. This offers seven programs including the php editor for one low registration fee and free updates on all programs for one year. At a slightly lower cost, the Creative Suite offers all seven programs but no updates. You can download the trial version of the PHP Editor by clicking on the button below. I hope you find the program useful and would like to hear your comments at products@sharewaregenie.com - The Genie - |
|
|
|
|
|
|
|
|
|
