Viewers: in countries Watching now:
Join author David Gassner as he describes how to add dynamic data to a PHP-enabled web site in Adobe Dreamweaver. This intermediate course shows how to plan and create a MySQL database, define a PHP-enabled site in Dreamweaver, connect the site to the database, and manage and present dynamic data. David also explores Dreamweaver features such as PHP custom class introspection and site-specific code hinting as well as the differences between the CS5 and CS6 versions of the software.
This course was updated on 6/12/2012.
In order to show you how to configure site-specific code hinting for a third-party library, I'll work in this folder: 03_managingcode > 04_sitespecific. I will set my site root to point to that folder. I have already installed the Zend Framework, a third-party PHP library and configure it so that it will work with PHP. I am going to configure Dreamweaver so that as I code my PHP in the editor, I will get code hints - that is, a list of available methods and properties of different classes in the library.
I will go to the menu and select Site > Site-Specific Code Hints. The Structure list shows you that Dreamweaver is preconfigured with code hinting for three commonly used libraries: Drupal, Joomla!, and WordPress. I am going to be configuring a new library, so I will leave the structure setting at New from Blank. Then I will click the Browse button, and I will navigate to the location of my Zend framework installation. I am working on Windows, so I will go to C:\phpincludes; you should go to whichever folder you installed the Zend Framework in. Then I'll double-click into the Zend framework, to the library folder.
That's as far as you should go. Don't click into the Zend folder; you'll select that in another step. Click the Select button and return to the Site-Specific Code Hints dialog. I am going to add references to folders that I want to scan for code hinting. I will click the Plus button, and I will click the Browse button, next to File/Folder. I will double-click the Zend folder. The Zend folder contains a number of subfolders that contain various classes. Although you can't see it in this dialog, there are many PHP files in this folder that will be included in your application files.
I will click the Select button. Don't check the Recursive option for this folder. If you do, it will take a long time to scan the entire framework. The purpose of including this folder is to include the top-level PHP include files for the different classes. Next, click the Plus button for Extensions, and then click into the new extension item and type in ".php" and then click Add. So what you have said is that you want to scan this folder and not any of its subfolders for all.php files, and any classes that are found in those files should be included for code hinting.
Next, you should include the folders containing specific classes you want to use. I am going to be using the Zend date class, so I will click the Plus button, I will browse again, I will double-click down to Zend, and then down to the Date folder, and then I will click Select. This time I do want to select Recursive. That will cause Dreamweaver to scan through all of the subfolders of this folder, and get all of the subclasses that the Date class is dependent on.
Once again, I will click Plus and then add the .php extension, and click Add. So take a look at the selections. The Zend folder is set without recursion, the Date folder is set with recursion, and they both use the .php extension. I will click OK, and I will be prompted to save my edits as a preset. I will click OK again, and I will give my new structure a name of ZendFramework. By creating this as a preset, you will be able to apply this code hinting preset to other sites in the future.
Find answers to the most frequently asked questions about Dreamweaver with PHP and MySQL .
Here are the FAQs that matched your search "" :
<?php include('../ZendFramework/library/Zend/Date.php'); ?
<?php echo $_SERVER['DOCUMENT_ROOT']; ?
You can then programmatically modify the include_path variable at runtime with the set_include_path() function. For example, if your physical root folder is /home/myroot, the code might look like this:
<?phpset_include_path('.' . PATH_SEPARATOR .'/home/myroot/ZendFramework/library/Zend');include('Date.php');?
Sorry, there are no matches for your search "" —to search again, type in another word or phrase and click search.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.