Edit the PHP site settings with DW

Source: Internet
Author: User
Tags php mysql php programming dreamweaver

How to write a PHP program using Dreamweaver CS6, how to create a PHP site using DW [input: 91CTC | time: 2013-03-19 11:51:30 | Author: 91ctc| Source: Site | view:5567Times

We all know that DW is the acronym for Dreamweaver, which is a very good Visual Web authoring tool, but you know what? It has already exceeded the previous version of the features, for different Web developers, it has a corresponding integration environment, let's learn from the next.

1, using DW to build a site, the author in the Http://www.91ctc.com/article/article-66.html article has used DW 8 to demonstrate the steps to create a static site. So today we take DW CS6 as an example to demonstrate the creation of a dynamic site. Since DW CS6 is the latest version of DW for Adobe, it has added a lot of friendly support to dynamic languages, such as code completion, code hints, grammar checking, and so on, so it has been very useful to write PHP programs.

2. First run this thing on your desktop:, and then:

3, click on the menu "site"-"new site",

4. You can see this dialog box:

5, this time, we give the site a name, for example: Myphpwebsite, select a path in the local site folder, my settings

Because my PHP environment is installed integrated Appserv (I use the version is Appserv 2.5.9), so, I choose the site root directory, the direct selection of the Appserv directory of the WWW directory, note that if you are using other integrated environment, Or you are a standalone PHP runtime environment, so you can choose your own site root directory.

6, select a good later, click on the "Save" below,

There is another need to explain is: generally our site root directory will have a lot of sites , and sometimes we in order to differentiate these sites , but also set up subdirectories, such as the WWW under the site01, SITE02, site03 ... Multiple sites, so in order not to clutter the Web site files, we recommend also set subdirectories, so that our site is set up like this:

Then click the Save button, so we click on the "File" button on the panel, we can see our new site:

7, so that we have correctly built the PHP site, then we can create new files and directories to start writing programs, on the site right-click on the "New file",

You can create a new PHP file, but we actually found that a new untitled.html file was created,

8, this shows that our site is still only static site, can not directly create a new PHP file, this user experience is not good, if not too troublesome, Can directly right-click untitled.html Rename, together with the extension to change, directly to index.php, nor can not, but this is really uncomfortable (we generally modify the file is not arbitrarily modified extension, to prevent the wrong change, because over a period of time, this file is what the extension is not remember, changed the extension, but also easy to hit not Open). Let's refine this inconvenient place.

9, we click on the menu "site"-"Manage Site",

10, will pop up a management Site dialog box, we found just our new myphpwebsite, and then click on the "Edit" icon below,

11, at this time, in the pop-up Site dialog box, click "Server",

12. Then click on this

13. Pop up a layer that looks very complex,

14, here, the server name arbitrarily write, own named, connection method we choose Local/Network , because we are doing tests, PHP environment is installed locally, (if you have FTP, you can use FTP).

15, the other options to maintain the following settings:

Server folder or select just that directory, Web URL We write http://127.0.0.1/MyPHPWebSite/this weburl is to use in the DW directly F12 preview PHP page .

16, then switch to advanced options,

We choose a server model, because we use PHP programming, in this case we choose PHP MySQL, there are other options,

We want to choose according to our own web development language, if you use JSP, then please choose JSP. What language you choose. Select OK and click "Save".

17, then you can see our configured server site,

We checked the test to make it easy to test. Then click Save-Finish.

18, this time, we will go to the site information manager, a new file, the default is the PHP file,

This time we can do our business, of course, the file name or change, generally new, DW will default selected file name, let you change. Here we change into index.php. Then double-click the file to open it.

19, for the convenience of coding, we choose a style, I choose the "Coding Staff (Advanced)" style,

20. We switch to Code view,

21, and then begin to write code in the document, if you do not mind the few lines of the DW generated code in the way, select all, directly delete it also does not hurt. We do the test, we do not delete, we write a line of code:

22, write well, save (Ctrl+s), and then directly Press F12 button can preview the effect,

Add: Use DW CS6 to write PHP program, it also has syntax error checking,

There is also a more powerful syntax hint function (when you hit the letter, press the CTRL+H key can be prompted),

Edit settings for PHP sites with DW

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.