The specified time is called dynamic content, because it changes every time you request this page. Click the refresh button on the browser to create a new page of different time. Note: checking the source code ('View' & gt; 'View source files' in Safari) will confirm that this page does not apply any client JavaScript to implement this consequence.
Test PHP installation (Macintosh)
You can test the Apache Web server and PHP Exploitation Program server on the Macintosh by running the test page.
However, when the application Web server processes the PHP page and MySQL database content, you must configure the server so that PHP and MySQL can be applied.
To test the Apache Web server and PHP application server, perform the following operations:
1. configure the server according to the articles on the Macromedia Web site.
2. create a plain text file in Dreamweaver or any text editor and name it timetest. php.
3. enter the following code in the file:
This page was created
On the computer running PHP.
This code shows the time when the page is processed on the server.
4. copy the file to the/Users/your_user_name/Sites folder on the Macintosh.
This Sites folder is the personal root folder of your Apache Web server.
5. enter the following URL in your Web browser and press Return:
Http: // localhost /~ Your_user_name/timetest. php
The test page should open and display the time, as shown below:
The specified time is called dynamic content, because it changes every time you request this page. Click the refresh button on the browser to create a new page of different time.
Note:Viewing the source code ('View'> 'View Source' in Safari) will confirm that this page does not apply any client JavaScript to achieve this.
If the page does not work as expected, check whether the following errors may exist:
- This file does not have a. php extension name.
- The URL contains a key-in error. Check whether there is an error and make sure there is no slash after the file name, such as http: // localhost /~ Your_user_name/timetest. php /. Make sure that your user name has a font size (~).
- Page code contains a key-in error.
- The Apache server is not running. Open 'system preferences 'and check whether 'personal Web sharing' is enabled in the 'sharing 'category '.
- After testing the server software, create a root folder for your Web application.