CS 1520 PHP Information
Note: Since the cs.pitt.edu Web server is
PHP-enabled, if you download these files the PHP will be interpreted and you
will only see the resulting html.
This will occur even if you right click and do the “Save Target As”
option. If you want to see the
source code for these with the PHP intact, you must download them in the
following way:
1)
Log
into your Unixs account or other account in which you have AFS access
2)
Copy
the files directly from my directory to yours using the cp command (or by
dragging if you are using a Windows version of AFS).
These
handouts are located in the following directory:
/afs/cs.pitt.edu/usr0/ramirez/public/html/cs1520/php
Thus,
for example, to copy ex1.php to your current directory using Unix commands, you
might do the following:
cp
/afs/cs.pitt.edu/usr0/ramirez/public/html/cs1520/php/ex1.php .
ex1.php – Simple PHP example
ex2.php ex2b.inc ex2c.inc ex2wrong.inc
– Including other files in a PHP script
ex3.php – PHP variables and their dynamic typing
ex4.php – Some predefined PHP variables
ex5.php – PHP expressions and some control statements
ex6.php – Intro. to PHP Arrays
ex7.php – More PHP arrays and PHP functions
ex8.php – More on PHP functions
readwrite.php – Simple file use in PHP
getpost.html getpost.php
– Simple demo of sending data to server via GET and POST
ex9.php ex9b.php – A slightly
more complex demonstration of server / client interaction
mail.php sendmail.php –
Sending mail via a PHP script
usesession.php – Demonstration of cookies and
sessions to maintain state
ex10.php – Intro. to Perl-style regular expressions
in PHP
ex11.php – Using regular expressions to parse a date
ex12.php – Using regular expressions to split a
sentence
setCDs.php – very simple intro to MySQL via PHP
setup.php CorEq.flat Corvettes.flat Equip.flat States.flat – setting up a slightly more complex
DB
carsdata.html access_cars.php
– Page that allows arbitrary DB query
setquotes.php quotes2.txt quoters.php – Script to set up quotes database
ex13.php ex13b.php ex13c.php – Scripts to display / manipulate quotes
database