DREAMWEAVER CS3
User Guide
504
This code displays the time when the page was processed on the server.
3
Copy the file to the C:\Inetpub\wwwroot folder of the Windows computer running IIS.
4
In your web browser, enter the URL of your test page, and then press Enter.
If you installed PHP on your local computer, you can enter the following URL:
http://localhost/timetest.php
The test page should open and display the time of day.
The specified time is known as dynamic content because it changes every time you request the page. Click your
browser’s Refresh button to generate a new page with a different time.
Note:
Looking at the source code (View > Source In Internet Explorer) will confirm that the page does not use any client-
side JavaScript to achieve this effect.
If the page doesn’t work as expected, check for the following possible errors:
•
The file does not have a .php extension.
•
You typed the page’s file path (C:\Inetput\wwwroot\timetest.php) instead of its URL (for example,
http://localhost/timetest.php) in the browser’s address text box.
If you type a file path in the browser (as you might be used to doing with normal HTML pages), you bypass the web
server and the application server. As a result, your page never gets processed by the server.
•
The URL contains a typing mistake. Check for errors and make sure the filename is not followed by a slash, such
as http://localhost/timetest.php/.
•
The page code contains a typing mistake.
After installing and testing the server software, create a root folder for your web application. See “Creating a root
folder for the application” on page 506.
To install the PHP application server on the Macintosh
1
If applicable, log into your Macintosh system using the Administrator account.
2
Create a folder named webapps in your main user folder, Users/
your_user_name
/webapps).
3
From the Entropy web site at
www.entropy.ch/software/macosx/php/
, download the PHP for 5.x for Apache 1.3
package (for example, entropy-php-5.2.0-3.tar.gz) and save it in your webapps folder.
4
On your Macintosh, open Terminal (Applications/Utilities) and change the default folder to webapps by typing
the following line on the Command line and pressing Enter:
cd webapps
5
In Terminal, uncompress the gz file by typing
gunzip
followed by the name of the gz file in your webapps folder.
For example, if you downloaded entropy-php-5.2.0-3.tar.gz, enter the following command and press Enter:
gunzip entropy-php-5.2.0-3.tar.gz
Note:
Do not use Stuffit Expander to uncompress the file.
6
In Terminal, open the tar archive that was uncompressed by typing
tar xf
followed by the name of the tar file.
Example:
tar xf entropy-php-5.2.0-3.tar
An installer package called entropy-php.mpkg is extracted from the archive.
September 4, 2007