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.
I've shown you so far how to execute PHP code on the server and then how to look in the browser to see what's returned from the server to the client. You can also do this in Dreamweaver using a feature called Live Code. For this demonstration, I'll use a set of files in the chapter 02_gettingstarted and in the folder 06_liveview. I'll set my site to point to that folder, and then I'll open the file variables.php. This file has a bit of PHP code at the top that sets a variable named welcome, and then down in the content area of the page, there is another PHP command that uses the echo command to output the value of the variable.
When I click the Live View button on the toolbar, Dreamweaver copies the PHP file over to the server folder, and then shows the resulting output in Design View. Let's take a look at the Live Code feature. The Live Code feature shows the resulting output in Code View. This is very similar to what you get in the browser when you say you want to view the source, but you see this all right here in Dreamweaver. I'll click Live Code, and now take a look at the result.
The initial PHP command up at the top of the page is stripped out, and the PHP command that's outputting the value of that variable is replaced with the resulting text. Now, I'll turn off the Live Code feature, and I'll see the original PHP commands, and turn it back on and see the output text. So the purpose of the Live Code feature is to allow you to see the resulting HTML that's generated at the server, by the combination of your HTML markup, your Cascading Style Sheets, and your PHP commands.
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.