One of the ways you can get up to speed in learning PHP — or any Web technology for that matter — is by using an excellent editor complete with all the things the you need to get things done. Most beginners start out with the familiar HTML Editor called DreamWeaver. The nice thing about DreamWeaver is that it is packed with many tools to speedup the development process of a page. It also supports a good number of server-side technologies including JSP, PHP, ColdFusion (from the same company called Macromedia), and the ASP.Net Languages C# and VB.Net. A host of features will be available to you once enable DreamWeaver’s support for your favorit server-side technology. It allows for syntax-highlighting, function-lookup, reflection, intellisense and many other things that could save you time and sanity when coding your script.
This brief tutorial will guide you to the process of integrating PHP Support with DreamWeaver. So here we go.
STEP 1. Using the Site Manager
From the Main Menu, go to Site -> Manage Sites… You must be presented with the Site Manager Window that looks like the one show below.
Click on the New Button to bring up the drop-down menu. Select Site item from the two available items, then click on it for the next step.
STEP 2. Site Definition
Specify the name that you want to call the site. Essentially, this is the name of your PHP Project. Limit the text to the fewest characters possible but see to it that it is easy to undertand so that you will have a hard time looking it up during your future DreamWeaver sessions.
STEP 3. Selecting Server-Side Technology
This step allows you to specify which server-side technology to use. Pay attention to what is available from the drop-down list. Select PHP MySQL since that will be the one we will be using for this lesson.
STEP 4. Specifying The Script Directory
This step involves specifying the directory where you want to work with your PHP Project. If you did not change the default setting on the Apache Server, this is usually a directory under the htdocs directory. This will be directory where you want to save all files used in the project.
We are assuming that your workstation server as development and testing server. Click on the Folder Icon (colored yellow) to be sure of the exact location of your PHP Project directory. If this is a new project with no files just as yet, you need to create it first. You may want to do so using the File Browser that pops up when you click the Folder Icon.
STEP 5. Testing the URL
You will know that you have successfully mapped your Project Directory when you click on the Test Button and it reports a success message.
If you get an Error Message, see to it that you append a slash (/) to the URL and try again. If it is still unsuccessful, you may want to repeat the previous steps by clicking on the Back Button.
STEP 6. Specifying The Development Server
Since you are working and testing your project locally, simply select No and click the Next Button.
STEP 7. Done
When you see this next Window, you are on the right track. You are actually brought back to the Site Manager. Only this time, it shows you that your project is now there ready for the action. If there are other items on the list, select the project that we are working on. Click Done and you are ready to begin your PHP Code.
STEP 8. Create a PHP Script.
Creating your PHP file is so easy now that you have enabled PHP Support in DreamWeaver. Locate the Files Panel on the right Pane of the DreamWeaver Screen and on the empty space right click with your mouse and select New File. You may want to overwrite the default name with something that is easy to remember and that reflect the purpose of your script.
It’s a snap, isn’t it. Drop me a message if you need help.