www.chagoyan.com |
||||
PHPPHP 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
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 |
|
|||
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. |