CS 3305 - Web Programming 2
What is the risk in performance of an Internet system?
Customers will not use a slow performing system
What does the "$" symbol do in PHP?
Defines variables
What is the most common protocol on the Internet?
HTTP (HyperText Transfer Protocol)
Which character is used for string concatenation in PHP?
"."
What do "/*" & "*/"; "//"; and "#" delimiters do in PHP?
They comment everything in between or after them.
What is "$_GET[];" used for in PHP?
To get information from a form that was submitted using the "get" method.
Social networks are part of which Internet era?
Web 2.0
What technology allows caching of PHP scripts?
* APC (Alternative PHP Cache) * Memcache
What is the most common extension for a source code package?
.tgz
What type of parameter is required in the PHP function "mysql_query();", which issues a command or query to the database?
A string parameter
Basic Authentication is a module in Apache, which allows administrators to require a password on a specific URL. Where should this module be used?
Administrator section of an application
Readability and Maintainability are examples of:
Advantages of scripted applications over compiled applications
Perl is an example of:
Server-side programming language
TRUE/FALSE: A Content Delivery Network, CDN, is used to distribute static assets such as images, documents, CSS and JavaScript across many locations.
TRUE
TRUE/FALSE: Apache is called httpd on a Linux server.
TRUE
TRUE/FALSE: In PHP all statements end with a semicolon ";"
TRUE
TRUE/FALSE: In PHP you can use both single quotes ( ' ' ) and double quotes ( " " ) for strings.
TRUE
TRUE/FALSE: Most of the web sites today are Web 2.0.
TRUE
TRUE/FALSE: PHP can generate PDF files based on database data, which is useful in creating reports.
TRUE
TRUE/FALSE: PHP generated PDF files can use custom fonts.
TRUE
TRUE/FALSE: Resizing the images with a server-side function will improve the performance of the CMS.
TRUE
TRUE/FALSE: Server-side programming allows users to login to web sites and generate content each time the page is visited.
TRUE
TRUE/FALSE: Server-side programming uses some of the same languages as client-side (workstation) programming.
TRUE
TRUE/FALSE: Software can be compiled at the command prompt.
TRUE
TRUE/FALSE: The PHP syntax is similar to many languages including C++ and Java, which makes it easy to learn for programmers.
TRUE
What is the advantage of caching?
Temporary storage of calculated data makes delivery faster
How can the speed of writing server code be increased?
When the developer receives immediate feedback upon making changes.
What are the functions of a PHP script?
a. Generate an email to one or more receipients. b. Insert data into a database c. Display data from a database
What information is needed when installing online applications on a PHP server?
a. database username b. database password c. database host name
Given that a database table has a field called FirstName, which code displays an element or field from the database record?
echo $row['FirstName'];
How are functions created in PHP?
function myFunction()
What parameters are needed to connect to a database?
host name and user
What PHP function allows a connection to MySQL database?
mysql_connect();
Which PHP function issues a command or query to the database?
mysql_query();
What PHP function sets the database name to be used out of all the databases installed on the given server?
mysql_select_db();
What function can you use to get the position of a string or character inside a string?
strrpos();
PHP means
Hypertext PreProcessor
Web 2.0
Internet technologies that support user collaboration and data exchange.
What does the "nano" command do on a Linux server?
It can be used to edit a text file on a Linux server.
What does the "cd" command do?
It changes current directory
What does the "make" command do?
It compiles the source code
What does the "tar -xzvf" command do?
It extracts a tarball archive file
What does the "$count++;" statement do?
It increments the value of the variable $count by 1
What does the "make install" command do?
It installs compiled code
What does the "wget" command does?
It is a Linux command that downloads source code.
What does the "--prefix=$HOME/apache" command do?
It is a configuration parameter that determines the location of a new software.
MySQL is an example of:
Open source database
Which 2 other programming languages is PHP syntax the most similar to?
Perl and C
PHP & Perl are examples of:
Scripted languages
putty.exe
A program that can be used on a Windows computer to access a command prompt on a Unix/Linux server.
Varnish is an example of:
An anonymous users reverse proxy cache
Weakly typed languages
Allows more flexibility when managing data because there's no need to define variable types before they are initialized
In the statement "$row=mysql_fetch_array($r);" what type of variable is $row?
An array()
osCommerce is an example of:
An open source shopping cart PHP application
Why is SSL required when accepting credit card transactions on a web site?
Because credit card companies implemented PCI
How can static content on the Internet can be updated?
By logging in and updating a page
"Is" and "Make" are examples of:
Commands that can be used on a Linux server
CMS
Content Management System which are systems that allow efficient web site management
"<PHP" and "?>"
Delimits the PHP code from the HTML code on a document. The set of tags for PHP code.
PHP "echo" statement
Displays the output to the screen.
a. CNN news page b. Yahoo home page c. Facebook Wall d. Any webpage which content changes per visit are all examples of:
Dynamic internet content
TRUE/FALSE: PHP cannot generate images, which are different each time a user visits the page.
FALSE
TRUE/FALSE: Playing a video online is an example of dynamic content on the Internet.
FALSE
TRUE/FALSE: Source code can be executed.
FALSE
TRUE/FALSE: When using the POST method, variables are displayed in the URL.
FALSE
