[ALUG] HTML embedded scripting, is it really this much of a kludge?

James Bensley jwbensley at gmail.com
Thu Feb 4 23:19:21 GMT 2010


Well if you want to put some PHP code in to a page you open the php tag:

<?php

MY_PHP_CODE_HERE

then close the php tag like so:

?>

When a client browses a page on your web server with these tags in the
page the web server see's the tags it processes the code before
serving the client the page. This is not a native language of a web
server or browser. To have PHP pages hosted on your server you must
have the PHP module installed. For Apache you need to download and
install the php module and then add it into the httpd.conf file.
(These days PHP is often bundles in just not enabled, although that
wouldn;t be the case if you downloaded the Apache source and built
from scratch). For windows you would need to download PHP, install it
somewhere then add it as an extension in you IIS settings and enabled
it for processing pages ending in .php.

Another example would be that Microsoft IIS supports ASP which is
again a server side scripting language that only runs on the IIS web
service if you enabled the ASP extensions.

As far as I am aware you can't have python or perl as a server side
scripting language. You may want to look at CGI/Perl scripts however
for processing parsed data. You can use Perl in this sense. For
example you can have a HTML form submit its data to a Perl script on
the server which can then process the parsed information as required
(for example, saving it to a file).

So back to the original question, PHP is an extension of your web
servers native functionality.

-- 
Regards,
James ;)

Samuel Goldwyn  - "I don't think anyone should write their
autobiography until after they're dead." -
http://www.brainyquote.com/quotes/authors/s/samuel_goldwyn.html



More information about the main mailing list