Web Development
Using PHP

Simpson College
Computer Science

PHP

PHP Worksheet

Many of these items can be found on Wikipedia, but do not cut/paste your answer from the web.

    Section 1: Web and Internet server basics

  1. What is a web server?
  2. What are the top four web servers that are on the market?
  3. What is an application server?
  4. What are three major types of application servers that you can get?
  5. What are some application servers that are on the market?
  6. What is a load balancer?
  7. What are the different types of load balancing listed here?
    http://technet.microsoft.com/en-us/library/ee191506.aspx
  8. See http://en.wikipedia.org/wiki/Web_hosting_service Describe:
    1. Free hosting
    2. Shared web hosting
    3. Reseller hosting
    4. Virtual dedicated hosting
    5. Dedicated hosting
    6. Managed hosting
    7. Co-location hosting
    8. Cloud hosting
  9. See: http://en.wikipedia.org/wiki/Domain_Name_System
    With the address: www.simpson.edu, what is the TLD, SLD, and third level domain name?
  10. What is a domain name registrar?

    Section 2: PHP

    See http://w3schools.com/php/default.asp
    For now we are skipping form processing, file management, cookies, sessions, database interaction, and XML.
  11. How does PHP code get separated from HTML code?
  12. Can users see PHP code?
  13. A new developer opens up a .php file in his/her browser. It "kind of" works, but not really. Explain what is happening.
  14. Show the code required to create a variable that is assigned to the text "Simpson College".
  15. How does PHP print the contents of a variable into a PHP document?
  16. How are strings concatenated together in PHP?
  17. Take a look at the PHP String Functions link. Pick one of the commands and write a brief summary of it.
  18. From that list of string functions, look at printf. Find information on that function here or here. How would you print out a floating number to only two decimal places?
  19. Give a simple example of an if/elseif/else statement in PHP that is different than the one shown in w3schools.
  20. Show an example of a PHP "for" loop that is different than the tutorial.
  21. Show an example of creating and calling a simple function in PHP.
  22. Use the date() function (look under the PHP Advanced section) and show how to output the date in the following format: 2009-07-01
  23. Show how to use a PHP "include" statement to perform a server-side include. This is very handy when you have common headers or footers you wish to include.

You are not logged in. Log in here and track your progress.