Categories
  Encyclosphere.org ENCYCLOREADER
  supported by EncyclosphereKSF

PHP exam questions

From Wikiversity - Reading time: 1 min

The following questions are to help you identify where you need more work or for use as a fun quiz-show style game in a classroom.

The questions are divided into beginner, intermediate and advanced sections.

Beginner[edit | edit source]

  1. Write the code that you can include in your file to find out not only whether PHP is supported on your server, but also which version etc.
  2. When testing your PHP pages, identify two likely causes of seeing the actual PHP code in your web browser.
  3. You're writing a program and need to create a variable called 'count' and set it's initial value to zero. Write the (a) Javascript code that will create your variable, followed by the (b) PHP code that will create your variable.
  4. convert the following psuedo-code into PHP:
if the variable $firstname is currently empty, then do the following:
print out the text "You need to enter your firstname" as a paragraph with the class="errormsg"

Licensed under CC BY-SA 3.0 | Source: https://en.wikiversity.org/wiki/PHP_exam_questions
16 views | Status: cached on February 13 2024 10:55:43
↧ Download this article as ZWI file
Encyclosphere.org EncycloReader is supported by the EncyclosphereKSF