In: Categories » Computers and technology » PHP » What Is PHP
| PHP is an interpreted language. It strongly resembles the C language. It also has some flavor of the Perl language. It is available for almost all platforms, including Linux, other versions of the Unix family, and Windows. PHP enables you to generate Web pages on-the-fly. You do this by pulling data from databases or files, manipulating that data, and then sending that data to a Web browser. Languages are either interpreted or compiled. An interpreter is a program that reads the file containing the code to be executed, and immediately acts upon it. The code in the file is called source code. In general, the code is readable and understandable by a person. How It WorksThe Web server generally runs PHP when a user requests a Web page that contains PHP code. Typically, the Web server is configured to use the filename extension to determine whether to run PHP. For example, a Web server will look at a Web page, and if it ends in .htm or in .html, the Web server will not attempt to execute any PHP script. If the page ends in .php (or in .php3, depending on how you have configured the Web server), the Web server looks at the contents of the Web page.
The Web page that the user sees is a mixture of the standard HTML commands on the page and the output of the PHP interpreter. HTML stands for Hypertext Markup Language, and is a widely available standard for text documents. The home page for HTML is http://www.w3.org/MarkUp/. Several versions of HTML are available. All recently produced browsers understand at least HTML version 1.1. You will often see references to stdout, stdin, and stderr when the behavior of programs is being described. Whenever a program is run under Linux, three standard channels for information are opened. [root@winbook /]# find /home/httpd/html -name "*.html" -print | grep index What It Does for YouWith its capability to execute complex instructions on data inserted into or retrieved from databases, PHP is an ideal format for creating interactive Web sites. It supports multiple databases, including mSQL, MySQL, Informix, and Oracle. Getting Online Help for PHPHelp for PHP is available at http://www.php.net. Online documentation along with FAQs and mailing lists is available at that site.
|
legal disclaimer
1) Our website is not responsible for the information contained by this article as well for any and all copyright infringements by authors and writers. E-articles is a free information resource. If you suspect this article for any copyright infringements, please read the Terms of service and contact us to investigate the problem.
2) The E-articles directory team is not responsible for inaccuracies, falsehoods, or any other types of misinformation this tutorial may contain and will not be liable for any loss or damage suffered by a user through the user's reliance on the information gained here. Please read the Terms of service
Useful tools and features
related articles
PHP is finally getting the attention that i deserves, yes I have always believed that PHP is one of those neglected languages, neglected because they are used in abundance but there isn't enough programs or as we call them frameworks to work on PHP. But that was until the release of PHP 5. After the release of PHP, there is a range of Frameworks available. Today we review and understand closely the various frameworks available for PHP. Some of the most popular frameworks for PHP are: ...
2. Common PHP Errors
In this tutorial, we are going to look at some of the common PHP errors that occur and how to solve them. Parse Errors A parse error occurs when the format of your PHP code is incorrect. For example, the following code: <?php for($i=1;$i<10;$i++){ $output = "Current Iteration: " . $i . "<br>" echo $output; } ?> will return an error similar to the following: Parse error: parse error, unexpected T_ECHO in c:\webserver\test2.php on lin...
3. PHP mail
In this article, we are going to look at some of the frequently asked questions regarding e-mail and PHP. We will begin by looking at a more fundamental issue: how to actually send an e-mail as HTML. How Do I Send an E-mail As HTML? As the PHP mail function defaults to sending plain text e-mails unless otherwise specified, a frequent question is how to send HTML e-mails using the mail function. The format for the mail function is as follows: mail($to, $subject, $message, $headers); ...
4. PHP Date and Time
In this tutorial, we look at commonly asked questions regarding the date function in PHP. How Do I Read the Date or Time from the Server? To read the date or time from the server, you need to use the PHP date function. You pass the date function a string, with special tokens in place of the date parameters you require. When the code is run, the tokens will be replaced with the date or time section that they represent. For example: <?php echo date("d/m/Y"); ?> outputs 11/02/2003 &...
5. PHP Random Password
In some applications, it can be useful to generate a random password, such as setting the user's initial password and then letting the user change it if he or she wishes. The function shown in the following code generates a password with a number of random characters, and you can set the length of the password when you call the function: <?php function randomPassword($length) { $possibleCharacters = "abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ"; $characterLength = strlen($possibleCharac...
6. How to Install PHP into Apache
In this section, we look at how to install PHP into Apache. The first step is to download it from the PHP web site. There are other sources for PHP around the Web, but it is much easier to get it from the source. Downloading PHP PHP is available as a free download from the PHP web site, http://www.php.net/ downloads.php. The file that you need to download is at the top of the page, in the section labeled Complete Source Code. The current file at the time of this writing was for PHP 4.3....
7. Installing PHP with Apache on Windows
We try to install PHP into Apache so it can process PHP pages and static HTML pages. We assume that you have installed and tested Apache. Downloading PHP The first step is to download PHP, which is available from the PHP downloads page at http://www.php.net/downloads.php. Scroll down the downloads page until you find the section labeled Windows Binaries. The current version at the time of this writing is PHP 4.3.0, and the...










