What is PHP?

PHP is a Hypertext Preprocessor that interprets HTML before sending a final page to the browser in much the same way as Server Side Includes. It also has a built-in scripting language which allows for programming code to be embedded into the document and executed "on the fly".
This basically combines a language similar to C and Perl with the option to include files. The scripting language and the HTML can be placed all in one document, thus saving on development time.
It also isn't as picky about CHMOD and ASCII or Binary modes.
It's a newer technology than Perl or SSI, so there are fewer freeware scripts available, but that is changing quite rapidly as more people recognise its potential.

What can PHP do?
As with SSI, PHP allows you to include information in a document that is re-generated every time it is accessed.
Some of the things you can include are:-
  • The current time and date
  • The URL of the current document
  • The size of a file on the system
  • The text of another file
  • The file name of the current document
  • The last modification time and date of the current document
You can also execute certain system commands (depending on your user privileges).
It doesn't end there though. PHP also allows its own scripting language to be used within documents it processes. If you have used Perl or C before, then moving on to using PHP will not have too steep a learning curve.
In many ways it is easier to use as you only have to concentrate on editing a single document rather than having the HTML and the script separate.

Add Feedback