 |
What is PHP and can I use it on my site? |
 The answer to the second question is: Yes, you can use PHP on your site. As for what PHP is...we refer you to an article in Wikipedia:
PHP is a scripted programming language that can be used to create websites. Short for "PHP: Hypertext Preprocessor" (the initials actually come from the earliest version of the program, which was called "Personal Home Page" but in their current form, constitute a recursive acronym), it is an open-source, reflective programming language used mainly for developing server-side applications and dynamic web content, and more recently, a broader range of software applications. For example, MediaWiki, the software behind Wikipedia, is written in PHP.
PHP allows interaction with a large number of relational database management systems, such as MySQL, Oracle, IBM DB2, Microsoft SQL Server, PostgreSQL, Firebird and SQLite. PHP runs on most major operating systems, including Unix, Linux, Windows, and Mac OS X, and can interact with many major web servers.
PHP allows a webmaster to combine HTML code with an advance scripting language which is then interpreted by the webserver then displayed on the client's screen.
PHP scripts can be executed by compiled module on our server OR as a .cgi script. Files ending in .php (as in index.php) are auttomatically executed by the compiled module located on our server.
PHP scripts can be executed as a .cgi script by adding the path to the PHP interpreter on the first line of the script:
#!/usr/bin/php
The script should have a .cgi extension (as index.cgi) then CHMOD'd to 755 (just like Perl scripts). Running as a .cgi script will cause the script to run under your user name which in turn allows it to write to files it owns.
Running PHP scripts with the .php extension is faster than .cgi because the PHP module is compiled in the server's native language. Running PHP scripts as .cgi is slightly slower because the code has to go through an interpreter. Unless your scripts need exclusive ownership of special files it always best to use the compiled module.
|
| |
|
| Additional
Info |
| |
| |
| Article
# |
109 |
| Posted
on |
28 April, 2006 |
| Viewed |
1327
times |
|
| |
|
| |
|
|
| |
| Related
Articles |
|
| |
|
|