| PHP |
| Name: | PHP |
| Created: | 1995 |
| By: | Rasmus Lerdorf |
| Home Page: | http://www.zend.com/zend/hof/rasmus.php |
| Acronym: | Hypertext Preprocessor |
| Language type: | Scripting |
| Extensions: | .phtml .php3 |
| Tutorial: | http://www.freewebmasterhelp.com/tutorials/php |
| Note: | server-side, cross-platform, HTML embedded scripting language |
|
What is PHP? PHP is a server-side, cross-platform, HTML embedded scripting language. What is a script? A script is a list of instructions telling the servers what to do to build up the requested web page. When you run the script the compiler will start at the top of the script file and work its way through the list of instructions. These instructions will tell the servers to do things such as create an HTML page, add a database record, modify or search the database and many more things. For PHP to work, your servers has to have support for PHP installed. All files ending in .php3 are handled by PHP. On most servers this is the default extension for PHP files. If your servers supports PHP you don't need to do anything. Just create your .php3 files and put them in your web directory and the servers will automatically parse them for you. What server-side scripting language means is that the script is put into the HTML files of a site. The servers processes the script before it is sent to the client browser. PHP code is not visible if you view the source of a page because the servers processes the code and returns only the output. There are hundreds of variations possible and each project will demand proper analysis of needed structure, online functionality, ease of use and many more aspects will have to be defined, solved and implemented. The example we give here in a simplified form is the use of CGI scripts that perform all functions in and from the database residing on the web server. CGI programs can run with or without a SQL server. Usage of SQL, the main database query language, will generally require a residing SQL server program on the server that stores the database. Calls from the scripts are run through the SQL server. Other scripting methods function well without the use of the SQL server. These type of scripts will most likely be used in somewhat smaller databases. Large amounts of data requires speed, stability and using the SQL server will increase reliability. PHP and mySQL is the most popular combination at this time. An advantage of PHP is the ability to connect to relational databases using fully featured internal functions. A whole range of databases including Oracle, DB2, mSQL and MySQL are supported. The main documentation for PHP is available here. PHP is free and you can use it freely for commercial and/or non-commercial use. MySQL is more or less free, depending on type of usage. If you have a server running UNIX, you can simply download both PHP and MySQL, then install the applications on your server. If you're running PHP on a remote UNIX server, Edit and Save the document as ASCII text file, then transfer the .php3 file to your server. And run if by calling it directly (http://yourdomain.com/yourscript.php3) or by calling it from the statements embedded in your template HTML pages. |