Sie sind auf Seite 1von 4

ZNZNZ Programming Test

1. The purpose of this programming test is for you to demonstrate your programming abilities and
your ability to use various website technologies. Obviously this test will not be comprehensive to
show all of your skills, but should allow you to demonstrate some of your skills.

2. Please develop a small website consisting of two pages as shown in the following figures. You do
not have to match exactly what is in the figures, but your solution should be close.
a. Page one: This is just a simple page with some graphics and text. This would be like the home
page of the site. Make a hotlink on the “Join Now” to go to the second page.
b. Page two: This page has a simple signup form. Accept the data from the form and just write it
out to a text file. Then just display the same page, but with the message “You have Successfully
joined ZNZNZ”

3. Generate these two pages using the following guildelines.


a. Code the pages using PHP5.
b. Use the Zoop MVC Framework and structure your solution appropriately. In other words, put
your code in the correct folders to be consistent with the Zoop framework.
c. Use CSS style sheets for text and components on the two pages that you deem appropriate.
d. Since Zoop supports Smarty Templates, build your two webpages using Smarty templates as
well as the PHP5 code to create the pages.

4. When your code is ready, email Dr. Robert Jackson who will provide you with an FTP account
where you can upload your code. His email address is rbjbuilder@mstarmail.com
a. Upload your code, including folders and subfolders in the location provided. Your uploaded
foldes and subfolders should be consistent with the Zoop framework folder structure.
b. Include in your upload your config.php and your includes.php files. (In other words, all that you
need to desplay the page. Do NOT upload the Zoop or Smarty libraries. Be sure all of your
library references and URLs in the code uses relative addressing.
c. The following lines show the location of the zoop directory on test server. These lines should go
in your config.php file.
define('zoop_dir', '/usr/share/zoop/framework');
define('app_dir', dirname(__file__));

5. Please also upload a file (yourname.txt) showing the amount of time you spent on each of the
following. Also in that file you may make any comments or suggestions that you may have.
Upload this file to your directory location when you upload the code.
a. Learning how Zoop works -- ________hours
b. Creating your graphics -- ___________hours
c. Creating the CSS sheets -- ____________hours
d. Creating the template pages -- ____________hours
e. Coding PHP5 -- __________hours
f. Testing and debugging -- ___________hours

6. Answer the five PHP questions given at the bottom of the document, and place them in the above
file (yourname.txt).

7. Please direct any questions to rbjbuilder@mstarmail.com


The first page
The second page
Please answer the following PHP questions.

1. What is the difference between a reference and a regular variable? How do you pass by
reference & why would you want to?

2. Given a line of text $string, how would you write a regular expression to strip all the HTML
tags from it?

3. What would the following code print to the browser? Why?


$num = 10;
function multiply(){
$num = $num * 10;
}
multiply();
echo $num;

4. What does === do? What’s an example of something that will give true for ‘==’, but not ‘===’?
5. How do you debug a PHP application?

Das könnte Ihnen auch gefallen