Searching...
Saturday 1 June 2013

Introduction To PHP

php- introduction
This is your first lecture so keep quite everybody. Let me first introduce you to php (hypertext preprocessor). [i will try to make it as short as possible]

PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. 
There are three main areas where PHP scripts are used.

  • Server-side scripting.

This is the most traditional and main target field for PHP. You need three things to make this work. The PHP parser (CGI or server module), a web server and a web browser. You need to run the web server, with a connected PHP installation. You can access the PHP program output with a web browser, viewing the PHP page through the server. All these can run on your home machine if you are just experimenting with PHP programming.

  • Command line scripting.

You can make a PHP script to run it without any server or browser. You only need the PHP parser to use it this way. This type of usage is ideal for scripts regularly executed using cron (on *nix or Linux) or Task Scheduler (on Windows). These scripts can also be used for simple text processing tasks.

  • Writing desktop applications.

PHP is probably not the very best language to create a desktop application with a graphical user interface, but if you know PHP very well, and would like to use some advanced PHP features in your client-side applications you can also use PHP-GTK to write such programs. You also have the ability to write cross-platform applications this way. PHP-GTK is an extension to PHP, not available in the main distribution. If you are interested in PHP-GTK, visit » gtk.php.net.

PHP can be used on all major operating systems and most of the web servers. PHP, initially developed to meet a developer's needs and modified/refined to meet needs of it's growing followers, has progressed at a tremendous rate due to it's ::

-practicality

The origins of PHP date back to 1995 when an independent software development contractor named Rasmus Lerdorf developed a Perl/CGI script that enabled him to know how many visitors were reading his online résumé. PHP was not created with the intention of designing an entirely new language, but to resolve a problem it's inventor was having. PHP was creted with practicality in mind. The result is a language that allows the user to build powerful applications even with a minimum of knowledge. PHP is a loosely typed language, meaning there is no need to explicitly create, typecast, or destroy a variable, although you are not prevented from doing so. PHP handles such matters internally, creating variables on the fly as they are called in a script, and employing a best-guess formula for automatically typecasting variables.

-power

Although you’re likely aware of PHP’s ability to interface with databases, manipulate form information, and create pages dynamically, you might not know that PHP can also do the following:
  • Create and manipulate Adobe Flash and Portable Document Format (PDF) files.
  • Evaluate a password for guess-ability by comparing it to language dictionaries and easily broken patterns.
  • Parse even the most complex of strings using the POSIX and Perl-based regular expression libraries.
  • Authenticate users against login credentials stored in flat files, databases, and even Microsoft’s Active Directory.
  • Communicate with a wide variety of protocols, including LDAP, IMAP, POP3,
  • NNTP, and DNS, among others.
  • Tightly integrate with a wide array of credit-card processing solutions.

And this doesn't take into account what’s available in the PHP Extension and Application Repository (PEAR) that serve to further extend PHP in countless ways.

-possibility

Do you prefer a language that embraces procedural programming? How about one that embraces the object-oriented paradigm? PHP offers comprehensive support for both. Although PHP was originally a solely functional language, the developers soon came to realize the importance of offering the popular OOP paradigm and took the steps to implement an extensive solution.

In PHP Native support is offered for more than 25 database products, including Adabas D, dBase, Empress, FilePro, FrontBase, Hyperwave, IBM DB2, Informix, Ingres, InterBase, mSQL, Microsoft SQL Server, MySQL, Oracle, Ovrimos, PostgreSQL, Solid, Sybase, Unix dbm, and Velocis. In addition, abstraction layer functions are available for accessing Berkeley DB–style databases. Several generalized database abstraction solutions are also available, among the most popular being PDO (www.php.net/pdo) and MDB2 (http://pear.php.net/package/MDB2). Finally, if you’re looking for an object relational mapping (ORM) solution, projects such as Propel (www.propelorm.org) should fit the bill quite nicely.

-price (open source software)

  •  Free of licensing restrictions imposed by most commercial products
  •  Open development and auditing process
  •  Participation is encouraged
  •  Free availability

0 comments:

Post a Comment

 
Back to top!