Learn About HTML and PHP


  By Antonis Theo

Learn About HTML and PHP



Server Side Scripting

Hypertext Pre-processor (PHP)

PHP stands for

PHP: Hypertext Pre-processor . The funny abbreviation follows the style set by Richard Stallman when he founded GNU (GNU's not Unix!) As the name says, it's a preprocessor

for hypertext, which is just another word for what most people call web pages.

Since it's a pre-processor, it runs on the remote web server and processes the web pages

before they are sent to the browser. This makes it a server-side scripting language. The fact

that it runs on the server has several benefits, and some disadvantages. Let's take the

benefits first:

·

On the server you can have access to things like a database. This means that you can make a script that sorts through large amounts of data, without the client having

to download them first.

·

It's only the output from the script that is sent to the client, not the script itself. That means that you can make the script invisible from the end-user. That makes PHPscripts browser-neutral; they don't depend on some capability of the browser. It also means that you don't have to worry that someone else can steal your carefully crafted script. It's not like when you
make a JavaScript --- everybody is able to read it in the source of the webpage. It has to be this way with client-side scripting, or else the client would be unable to get the source of the script, and therefore unable to do any scripting. ·

You can make your own programs for use in your scripts. You could implement part of the script in C, and then call the program from your script to make it run faster.

PHP is a parsed language, meaning that there are no compiled binaries. Every time

someone requests a page with PHP-code, the parser looks through the page and

executes any PHP-statements it might find. Fortunately this is a very fast process, but

you might want to speed things up if you have a very complicated script.

However, there are also some disadvantages:

·

By executing everything on the server, you put more strain on it. With many concurrent requests, and large complex scripts, the server might not be able to

handle it. But this isn't a real concern because the parser in PHP is fast.

·

The pages can't do anything themselves --- you need the server to do the magic. This means that the pages will lose some of their functionality if your visitors decide to save them to their computer. You could of course still put some

JavaScript in your pages. This is a very powerful combination between server-and client-side scripting. You could use PHP to fetch some values from a database, and then setup your variables in the JavaScript with these values.

Tags & Keywords : PHP, SSS, Server side scripting, html

Share this article:


Comments


Hairunsyah

#1 Posted by Hairunsyah - May 27, 2009, 4:25 am Rating: ratingfullratingfullratingfullratingfullratingempty Unrated

GOOD

shajila

#2 Posted by shajila - Jun 2, 2009, 4:37 pm Rating: ratingfullratingfullratingfullratingemptyratingempty Unrated

Informational

betterbodyartist

#3 Posted by betterbodyartist - Jun 19, 2009, 11:12 pm Rating: ratingfullratingfullratingfullratingfullratingfull Unrated

Thanks for the details.


How would you rate the quality of this article?
Rating: * Poor Excellent
Vote on this Article and Earn 3 Points
Your Name:
Your Email:
Your Comment: *
Comment on this Article and Earn 12 Points.
Verification * img0img1img2img3img4img5

Please copy the characters from the image above into the text field below. Doing this helps us prevent automated submissions.
 



No popular authors found.
No popular articles found.