Search Google

www.chagoyan.com

Mr. Chagoyan


PHP

PHP was conceived in 1994 as a set of macros to help coders (us) maintain personal home pages. PHP used to stand for personal home pages. Today, PHP is officially known as “PHP: Hypertext PreProcessor.” It is a server-side scripting language, similar to JavaScript, but instead of running on the users’ Web Browser, PHP runs on the server. This means that all processing is done on the server and not on the users’ computer.

PHP is a powerful language, which is often used to pull data from databases. That will be the ultimate focus of our class. Surprisingly, PHP is easy to learn, but it does take some practice.

In order to learn PHP you will need a Web server that can parse it. In this class we will learn PHP using XAMPP. We will test locally and then FTP to our Web server.

Quick Facts
  • PHP uses the .php extension (most of the time).
  • PHP is free. It is open source, which means that no one owns it. It is free to download and constantly being upgraded by a committed PHP community.
  • PHP is great for speedy development, mainly because it is easy to learn.
  • PHP works on many operating system, Web servers, and databases. Your PHP code will run the same on many systems.
  • PHP is fast and compares favorably with other server-side scripting languages, such as Cold Fusion, ASP, and PERL.
  • PHP has great database integration. In this class we will use MySQL.

Like HTML files, PHP files are just text files. This text files are named with the .php extension, although you can change this (but don’t). In this class, PHP will be coded with the following coding style:

<?php print("Hello Web Page Design 2!"); ?>

As you can see, PHP is coded similar to JavaScript code, so those of you with a JavaScript background should adapt well. In the example above, you can see that PHP begins with an opening angle bracket (<), a question mark (?), and the word php. All code is placed before the ending question mark and angle bracket. Like JavaScript, all commands end with the semi-colon (;).

Here’s another example of PHP code:

<?php print("Salsa dancing is fun!"); ?>

Both these examples use the built-in print () function. We will discuss functions later in the class.

How poplular is PHP?

Top Programming Languages - TIOBE Programming Index


-->
DropBox
Shared
Files






Random Number

Copyright © 2004-2024 Chagoyan.com/Chaggy.net | All Rights Reserved

All courses at Coalinga High School are open to all students without regard to race, color, national origin, sex, disability, sexual orientation, gender, ethnic group identification, ancestry, or religion.