CS 161 - Introduction to Programming with PHP

Lecture Notes: 17 Sept 2010
 

Review of syllabus and academic honesty policies

Comments on helpful resources

Comments on the PHP language:

  • why PHP was chosen for this class
    • widely available and commonly used at COM-FSM
    • easily used from a command-line or in web pages
    • similar to many traditional langauges
  • what you can expect to learn about PHP during the term
  • why do we program computers?
  • structured programming vs. object-oriented programming

First look at some PHP code:

<?php echo "Hello, World!\n"; ?>

Working in Linux/UNIX the environment

  • directories; your home directory, creating others
  • text editors; nano, vi, others?
  • running PHP scripts

Programming Assignment #1 Due: Wednesday 22 September

Create the above Hello, World program on shark and verify that it executes propery. E-mail the file's location (complete path name) to me so I can verify execution of the program.

Goals of assignment: learn how to access and use a text editor available in Linux; learn how to execute PHP scripts from a command line

Page last updated 16 Sept 2010