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 a previous video, I described how to install and configure the Zend Framework into your PHP installation on Windows using WAMP server. In this video I'll describe how to do the same thing on MacOS X with MAMP. I'll assume that you're working with MAMP in its default configuration with the MAMP folder under Applications. If you have access to the Exercise Files that come with the course, you'll find a copy of the Zend Framework in the 03 managing code folder under Exercise Files. If you don't have access to those files, you can download Zend Framework from the Zend Framework website website at framework.zend.com/download/latest.
Look for the Zend Framework minimal package. Click the free download link and follow the prompts. You can place the Zend Framework anywhere on your Mac hard disk. I typically copy it under the MAMP installation folder. So I'll do that in these steps. I have an alias to my MAMP folder here. It's under /Applications/MAMP. I'll go back to the 03 managing code folder and copy the Zend Framework to the Clipboard. Then go to the MAMP folder and paste it in.
The next step is to include the Zend Framework files in your PHP configuration. You do this by modifying the PHP.ini file. You'll need to be sure which version of PHP. ini is being used by your PHP installation. To do that, go to MAMP and click Open start page. From there click on phpInfo at the top. The phpInfo page will show you which PHP.ini is being used under Loaded Configuration File.
My PHP.ini is under / applications/MAMP/conf/PHP 5.3/PHP.ini. I'll navigate to that folder in Finder. I'll start at my Mac hard disk root and go down to Applications , then MAMP, con, PHP 5.3, and here's the INI file I need to modify.
You can open this with any text editor. Once you've opened PHP.ini, search for the string include_path. Working in Text Edit I've pressed Command+F, typed an include_path and then clicked Next, and I'll find that the first instance of that string is in a comment. I'll click Next again and this takes me to the actual setting. This is the default setting in the PHP.INI file provided with MAMP. It includes a dot, meaning the current directory of the currently executing PHP file, Then the paths are separated from each other or with a colon.
In Windows, it's a semicolon. The following path refers to an area where you might add files in your MAMP installation. In fact, it refers to a directory that doesn't actually exist, but I'm going to keep it in that string and then add the correct path from my Zend Framework installation. I'll place the cursor after the current path and before the closing quote, then put in a colon, and then the path, / applications/MAMP/ZendFramework/library.
Make sure you type it exactly as I'm showing here. It is case sensitive. Save and close your PHP. ini file and return to MAMP. Click the Stop Servers button to close down your servers. If necessary, type in your administrator password, and then once the servers gave shut down, click Start Servers to start them up again. The Zend Framework classes should now be available to your PHP runtime environment and as I'll show in subsequent videos, you'll be able to include and execute the classes where ever you need them in your PHP-based website.
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.