PHP
From Wsms
PHP is a programming language.
Contents |
Installation
Windows Installation
20070319a#PHP_Install_on_Windows_2003
Linux Installation
See:
http://users.tkk.fi/~tkarvine/lamp-linux-apache-mysql-php.html
20070319a#PHP_installation_on_Linux
Tips, Tricks, and Caveats
use ln -s to share your PHP code
If you are a php instructor, you may want to put your PHP code on a website so that your students can access it. The problem with this is that apache invokes that PHP intrepreter whenever the browser asks for a file with the php suffix. The way to get around this is to make a symbolic link:
[ggeller@ws05 20070321]$ ln -s getnamenum.php getnamenum-php.txt
Now your students can see both the code and the result of executing the code.
You can also use the .phps extension, but it has to be enabled in your Apache coconfiguration files.
[ggeller@ws05 20070321]$ ln -s getnamenum.php getnamenum.phps
The .phps stuff is commented out by default on Fedora Core 5. If you look at /etc/httpd/conf.d, you will see:
[ggeller@arthur conf.d]$ grep phps php.conf # Uncomment the following line to allow PHP to pretty-print .phps #AddType application/x-httpd-php-source .phps
Caveats
You can't always show PHP code in Mediawiki
Mediawiki is PHP-based. Sometimes when you try two show PHP code in a wiki page in a pre block, it confuses Mediawiki's input parser and your edit is lost.
see also
An Introduction to PHP3 By John Holland http://www2.linuxjournal.com/article/3658. Even though this article is showing its age, it is still a good brief introduction to the language. Be warned that the examples don't work unless you rename the files from .php3 to .php and turn on register_globals.
PHP Performance Profiling by Jonathan Oxer http://www.linuxjournal.com/article/7213
On the Security of PHP, Part 1 by Jordan Dimov http://www.developer.com/lang/print.php/918141
On the Security of PHP, Part 2 by Jordan Dimov http://www.developer.com/lang/article.php/922871
Learning PHP by Elizabeth Fulghum http://www.developer.com/lang/php/article.php/3288671
Learning_PHP_5_by_David_Sklar
ONLamp.com PHP DevCenter http://www.onlamp.com/php/
Class Notes: 20070319, 20070319a, 20070320, 20070320a, 20070321, 20070321a, 20070322, 20070322a, 20070323, 20070323a
man php
PHP/Validation
