![]() Its only purpose is to comment out a section of HTML inside a PHP page and prevent the affected section from being sent to the browser. The final option,, is of limited use because you cannot nest PHP tags inside a PHP code block. ![]() The only options of value in a PHP script are /* */ and //. With the insertion point anywhere between two braces, click the Balance Braces icon in the Coding toolbar to highlight the code enclosed by the braces. ![]() Unlike some other editing programs, Dreamweaver does not automatically insert a closing brace when you type an opening brace, but Balance Braces is an indispensible visual guide. Balancing bracesĬurly braces must always be in matching pairs, but there might be dozens or hundreds of lines of code between the opening and closing braces. However, if you need to use a filename extension that’s not on the list, you can get Dreamweaver to recognize it by following the instructions found at. Unless you have a specific reason for choosing a different filename extension, you should always use. tpl files) but treats them the same way as HTML files. It can be toggled on and off by choosing View > Code View Options > Syntax Coloring.ĭreamweaver CS5 supports PHP syntax coloring and code hints in files that use the following filename extensions. To change the background color of Code view, click OK to close the Edit Coloring Scheme for PHP dialog box, and then click the color box next to “Default background” in the Code Coloring category in the Preferences panel.“Background color” applies a background color only to the selected type of element.Use bold, italic, or underlined text, or any combination of them to change text.Click the color box next to “Text color” to select a new color.Select the type of element you want to change in the “Styles for” list or the Preview pane.Just click in the Preview pane at the bottom of the dialog box, and Dreamweaver automatically highlights the appropriate PHP value in the “Styles for” list. Alternatively, choose View > Code View Options > Line Numbers to toggle them on and off.ĭon’t be confused that the first item in the “Styles for” list is for a different server-side technology (ColdFusion Script Tag). If line numbers are not visible or if you want to turn them off, click the Line Numbers icon in the Coding toolbar. By default, Dreamweaver displays line numbers in a column on the left of Code view. When working with PHP scripts, it’s essential to be able to find a specific line, because PHP error messages always refer to the line where a problem was identified. In addition, I’ll explain how to set various options, so existing users will benefit from some of the information here as well. PHP features also in previous versionsįor the benefit of newcomers to Dreamweaver, I’ll describe briefly the basic features inherited from previous versions before moving on to the advanced PHP features that are new to Dreamweaver CS5. Come back later to read each section in more detail when you’re more familiar with PHP to learn about particular features. If you’re completely new to PHP, it might be best for you to skim the rest of this lesson to get a flavor of what’s in store. Let’s take a closer look at why Dreamweaver CS5 has become such a good development environment for beginners and more experienced PHP developers. A Tour of the Main PHP Features in Dreamweaver CS5 A Tour of the Main PHP Features in Dreamweaver CS5 ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |