You can test the Apache web server and PHP application server on your Macintosh by running a test page.
However, before you can use the web server to serve PHP pages and content from MySQL databases, you must configure the server to work with PHP and MySQL. For information on this process, see www.macromedia.com/go/php_macintosh.
<p>This page was created at <b> <?php echo date("h:i:s a", time()); ?> </b> on the computer running PHP.</p>
This code displays the time the page was processed on the server.
This Sites folder is your personal root folder for the Apache web server.
http://localhost/~your_user_name/timetest.php
The test page should open and display a time of day.
The specified time is known as dynamic content because it changes every time you request the page. Click your browsers Refresh button to generate a new page with a different time.
NOTE |
|
Looking at the source code (View > View Source in Safari) will confirm that the page does not use any client-side JavaScript to achieve this effect. |
If the page doesnt work as expected, check for the following possible errors:
After testing and testing the server software, create a root folder for your web application. (See Creating a root folder (Macintosh).)