Title: Internet Review
1Internet Review
2Internet Review
What does robustness mean with respect to a
network?
Resilience to disruptions or faults.
Name two reasons the Internet is considered
robust?
Packets
Routing multiple paths between any two nodes
3Gateway
What is a router?
A network device that connects two or more
networks
What is a gateway?
A router that connects different networks, often
a LAN and the Internet
4Network Layers
Name and describe the five layers of a network
connection
Application Layer
Transport Control Protocol (TCP) Layer
Internet Protocol (IP) layer
Local Access Network (LAN) Protocol
Physical layer
5Layers
Name three reasons for using layers
Modularity (development and configuration)
Efficiency (multitasking)
Reliability
6HTML
What is a tag (and how is it formatted)?
ltcentergt
Most tags come in pairs (T or F)?
True
7How does PHP work?
8PHP
What does PHP add to web pages?
The ability to change the content of a web page
based upon input and processing also, the
ability to store information and execute commands
9PHP-Input
Name two input sources for PHP
(1) Web-page visitors (2) The system
10Programming Languages
What is a programming language?
A human-readable, text-based language for telling
a computer to do something
11PL Categories
Describe the 4 types of Programming Languages
Functional
Imperative
Declarative
Object-Oriented
12Source Code
What is source code?
Text file written in a computer language
13Translating Source Code
Describe two devices for translating source code
into something a computer can understand
Interpreter
Compiler
14Programs
What is a binary?
Executable program you can run
15Programs
Compiled programs are easy to reverse engineer (T
or F)?
False
16Compiling vs. Interpreting
Which uses more overhead when running a program?
Interpreting
17PHP
Is PHP interpreted or compiled, and why?
Interpreted
18Open Source
What is the Open Source Software Movement all
about?
Inclusion of source code along with executable
programs, so users can customize and improve them
19PHP in HTML
What is the PHP tag?
lt?php // your PHP program ?gt
20Echo
Give an example of the echo command
lt?php echo I would like to thank . . . ?gt
21PHP Variables
Name and describe the variable types
Integer (no decimal point)
Float (decimal point)
String (text)
Array (list of one of the other three types)
22Integers vs. Floats
Why are floats less precise than integers?
Integers stored a single number Floats stored as
mantissa and exponent
23Variables in Strings
How would you insert a variable into a string
(e.g., with the echo command)?
lt?php echo Name is name.ltbrgt ?gt
24Flawed Code
Whats wrong with this code? ltphp Name
Judy Echo Name ?gt
lt?php
Name
25What does this do?
a getenv(REMOTE_ADDR) echo a
Prints the visitors IP address
26Whats the result?
a 21 b 7 a / b echo a
3
27Whats the result?
a 6 b a 5 a -2 b / a echo
b
7
28What does this do?
b . a
. is the concatenation operator a is appended to
the end of b b Happy b . Birthday!
29Format of if ... else statement?
if ( a gt 5 ) echo Yea, dude! else
echo No way!
30Rewrite as while statement
for ( i 0 i lt 10 i ) echo i
i 0 while ( i lt 10 ) echo i i
31What will happen here?
a 1 while ( a gt 0 ) echo a
Infinite Loop!
32What do these do?
OR
AND
!
NOT
33Whats the result?
floor( 12.9 )
12
round( 2.1 )
2
ceil( sqrt( 10 ) )
4
34Forms
Describe five form objects
Text field Check box Radio button Pull-down
menu Button
35Forms and PHP
How do you use a form to get information to a PHP
script?
ltform valuenamegt becomes name ltform
actiondoit.phpgt