- What You Will Learn
- Approximate Time
- Lesson Files
- Dynamic Web Site Basics
- Choosing a Server Model
- Redefining the Newland Tours Site for Dynamic Development
- Developing with a Local Server
- Setting Up a Local Environment for IIS/ASP
- Setting Up a Local Environment for ColdFusion
- Setting Up a Local Environment for Apache/PHP
- Developing with a Remote Server
- Defining a Dynamic Site in Dreamweaver (All Users)
- Building a Simple, Dynamic Application
- What You Have Learned
Defining a Dynamic Site in Dreamweaver (All Users)
Regardless of which section above applied to you, use the following steps to define your site in Dreamweaver. Before you begin, you must have access to a fully configured Web server, with the desired application server/module loaded and running.
- With the Newland site open in Dreamweaver, choose Site > Manage Sites. In the Manage Sites dialog, make sure Newland Tours
is selected, and click Edit.
Remember, the Newland Tours site is already defined. You don’t need to start from scratch. You just need to add the remote and testing server information to the existing site.
- In the Site Definition for Newland Tours dialog, click the Advanced tab. Then select the Remote Info category from the Category
list on the left side. From the Access drop-down menu, make a selection and enter the appropriate information in the fields
that appear, using the guidelines below.
If you are developing on a computer with a local version of IIS installed (ASP or ColdFusion via IIS), choose Local/Network from the Access drop-down menu. Next to the Remote Folder field, click the browse button, and browse to the C:\Inetpub\wwwroot\ folder. Click the Add New Folder button to create a new folder, called newland. Double-click this folder to select it as the Remote folder.
If you are developing on a computer with a local version of the stand-alone ColdFusion Web server, choose Local/Network in the Access drop-down menu. Next to the Remote Folder field, click the browse button, and browse to the C:\CFusionMX\wwwroot folder. Click the Add New Folder button to create a new folder, called newland. Double-click this folder to select it as the Remote folder.
If you are developing on a computer with a local version of Apache running, choose Local/Network in the Access drop-down menu. Next to the Remote Folder field, click the browse button, and browse to the C:\Program Files\Apache Group\ Apache2\htdocs folder (Windows) or to HD:Library:WebServer:Documents folder (Macintosh). Click the Add New Folder button (Windows) or New Folder button (Macintosh) to create a new folder, called newland. Double-click this folder to select it as the Remote folder.
If you are developing on a computer that has a network connection to the server, choose Local/Network in the Access drop-down, and browse to your folder on the server. Most likely, this appears in a mapped network drive. Use the Choose Remote Folder dialog to add a new folder called newland, and select that as the Remote folder.
If you are developing on a computer that has FTP access to the server, first make sure that there is a folder in your account called newland. Then, in Dreamweaver’s Site Definition dialog, select FTP from the Access menu, and type the IP or Web address in the FTP Host field. Enter the path to the newland folder in the Host Directory field. Then fill in the Login and Password fields. When you have done all this, click the Test button to make sure you have configured it all correctly.
- From the Category list at left, select Testing Server. From the Server Model menu, select ASP VBScript, ColdFusion, or PHP MySQL, depending on which server model you have decided to use. In the Access menu, and also any options that appear beneath
it, enter the same information you used in the previous step.
For the Newland Tours site, the Remote site and the Testing Server site are essentially the same. The difference is that the Remote site exists to enable Dreamweaver to save files to the correct folder, while the Testing Server enables Dreamweaver to test files after they have been processed on the server, so you can verify that they actually work.
- In the URL Prefix field near the bottom of the Testing Server category tab, enter the site’s URL.
If you are using IIS locally on your computer (all ASP and some ColdFusion users), enter http://localhost/newland/.
If you are running ColdFusion locally as a stand-alone server without IIS, enter http://localhost:8500/newland/.
If you are running Apache locally in Windows or on a Macintosh, enter http://localhost/newland/.
If you are using a remote server, whether through a network or through FTP, enter the server’s URL, which the site administrator should have given you. It probably looks something like http://www.bigcompany.com/newland/.
Either way, the URL prefix must begin with http:// and should not have any drive letters (such as h:\) anywhere in it. Also note that the slashes in the URL are forward slashes, not backslashes.
- Click OK to save and close the dialog, and then click Done to close the Edit Sites dialog.
The site is now redefined and should be ready for dynamic development.
- One at a time, right-click (Windows) or Control-click (Macintosh) each of the HTML files in the Site panel, choose Edit >
Rename, and change the extension from .htm to .asp, .cfm, or .php as appropriate. Whenever the Update Files dialog appears,
Changing the extension is required when you upgrade to dynamic sites, because the server uses the extension to determine whether to process any special code on the page.
When you change the extension, all the links that point to that page are broken. Dreamweaver’s site manager catches this and fixes the problem when you choose Update.
- Click once on the top-level folder, and click the Put File(s) button.
This uploads the entire site to the remote folder and testing server.
- Click once to select index.asp, index.cfm, or index.php in the Site panel, and press F12 (Windows) or Option-F12 (Mac).
Pressing F12 or Option-F12 tests the site as it runs through the server. This test results in either good news or bad news. If you can see the Newland Tours index page, then you have correctly configured the site, and you are ready to start developing. If you get an error message or the site doesn’t display properly, then something has gone amiss. To troubleshoot, take a second look at the URL prefix. Also, use Windows Explorer or Macintosh Finder to make sure that the files really were uploaded to the remote site. If you are still hung up, talk to your site administrator, who should be able to help you resolve this problem.