Home > Web hosting - Linux. > Using PHP on the Linux web hosting platform

Using PHP on the Linux web hosting platform

PHP is a fast and versatile scripting language that allows quick and easy addition of interactivity to your website. For those of you used to using ASP, it is very similar, but faster and more efficient. You can make database calls, output text and random variables, simple field includes (e.g. current date), as well as call files and templates from your webspace at Pulsant.
<? echo (“this is a simple script\n”); ?>

<?php echo(“if you want to serve XML documents, do like this\n”); ?>

<script language=”php”>
echo (“some editors don’t like processing instructions”);

As of December 2010, the version of PHP is 5.1.6. and full details of the version, available modules and configuration can be found at http://rhel5phpinfo.lumison.net/phpinfo.php

Note that if the global settings are not as required it is possible to overide many by adding settings to a .htaccess file, see the PHP documentation at http://www.php.net/ for full details.

In order to use PHP in your webpages, insert the PHP code into your webpage and upload it to your web space using a .php extension. If you would like an alternative file extension used then add the following command to a .htaccess file in the affected web directory or one of it’s parents (The example shown will cause .html files to be parsed).

AddType application/x-httpd-php html