Hosting Ireland uses cookies to enhance your browsing experience and to create a secure and effective website for our customers. By using this site you agree that we may store and access cookies on your browser, unless you have disabled your cookies. Click here to read our privacy policy.

Ok, don't remind me again.

Call:1890 987000
Email:support@hostingireland.ie
PHP Tutorial

WEB HOSTING TUTORIALS -

tutorials & support

Basic PHP Tutorial

PHP Modules

The following PHP modules/features are available

  • Zend Optimizer
  • FTP
  • GD
  • Free Type
  • Curl
  • MySQL
  • XML
  • Zlib
  • BCmaths
  • Calendar

Creating a PHP script

First create an HTML web page in a text editor and type:

<html>
<head>
<title>A PHP Page</title>
</head>
<body>

Now for the PHP. PHP needs to be placed in between the special tags, <?php ...... ?>. Next we will start the PHP tag and create a variable to hold the text 'Hello World'.

<?php
//Put the string value Hello World into a variable
$Message = "Hello Word";

Note that the code lines always end with a semi colon (;). Now we can display the contents of the variable in the HTML using the PHP print function.

//Output the content of the variable $Message to the page
print $Message;
?>

Now we close the body tag and the HTML tag.

</body>
</html>

Now save the file, 'helloworld.php' save the file to a directory on your linux hosting account.
The complete source of the file:

<html>
<head>
<title>A PHP Page</title>
</head>
<body>

<?php
//Put the string value Hello World into a variable
$Message = "Hello Word";
//Output the content of the variable $Message to the page
print $Message;
?>
</body>
</html>

To display the page open your web browser and type 'http://mydomain/helloworld.php', replacing mydomain with the domain you have hosted.

Technical Support On PHP Scripts

Please note that we cannot provide technical support on third party PHP scripts, problems with a third party PHP script should be referred to the script vendor.

Cloud Computing Servers