Tips on Learning PHP Programming

Filed Under (Any Topics, Careers, Daily Blog, Free Stuff) by animo on 17-08-2007

 

Introduction

PHP originally stood for Personal Home Page but it is now an acronym which stands for PHP: Hypertext Preprocessor. The primary purpose of PHP is to dynamically generate web pages very quickly by placing the scripts directly into HTML files. The following steps will aid in your search for information about this scripting language.

Instructions

Difficulty: Moderately Challenging

Steps

1

Step One

Decide on what you want to use PHP for. There are three primary purposes: server-side scripting, command line scripting and desktop applications. Server-side scripting will require PHP, a web server and a web browser. For command line scripting you will only need the command line executable. Desktop applications will require the PHP-GTK extension which is not included in the official PHP distribution.

2

Step Two

Take a look at this trivial PHP script and notice the basic PHP syntax and how it is embedded in HTML:

<html>
<head>
<title>Hello World Script</title>
</head>
<body>
<?php
echo “hello world!”;
?>
</body>
</html>

The PHP code is enclosed in start and end tags. “<?php” is the start tag and “?>” is the end tag. As you might expect, this script does nothing more than output the text “hello world!”

3

Step Three

Study the security considerations of running PHP on a web server. PHP is designed to be more secure than C or Perl, for example, but anything that is able to access files, execute commands and open network connections on a server is insecure by default. The correct selection of configuration options will be essential.

4

Step Four

Learn about some of the features in PHP which make it so powerful to write CGI programs in. HTTP authentication is only available when PHP is running as an Apache module. PHP supports cookies which store data on a remote browser and sessions which preserve some data over different accesses.

5

Step Five

Examine the large number of PHP commands. Most of them can be organized in the following major groups: Arrays, Database, Date and Time, File Handling, Mathematical, Session and Cookie, Sockets, System Commands and Text.

Enter your email address:

 

 

Post a comment

 

ads
ads
ads
ads
Close
E-mail It
Socialized through Gregarious 42