Web Hosting

PHP Hosting

Zend Hosting

Sablotron Hosting

ImageMagick Hosting

Forum Hosting

PHPBB Hosting

PHPNuke Hosting

Order Now


New to hosting?
Check out the step-by-step guides to help you get started.
Setting up your 1st website
Transferring your website

Domain Search: www.

SERVERS & NETWORK  |  SUPPORT  |  WHY OXXUS  |  TESTIMONIALS  |  ABOUT US  |  CONTACT |  ORDER NOW

 

 

PHP Scripting Examples

 

 

PHP scripting - The basic examples

 

PHP script files consists of plain text, just like a HTML document.

 

So open your favorite text editor, and type the following:

<?php
print "Hello World";
?>

 

Save the PHP’s files using the extension ".php" – it's mandatory , because it tells the server to how to treat these files, and run the appropriate interpreter to "understand" their contents.

 

So just go ahead and give it an easy-to-remember name like "helloworld.php". Once the file is saved the Hello World example can be accessed at the http://DOMAIN_NAME.EXTENSION/helloworld.php

 

Let's say you have the DOMAIN_NAME of test.com the url to the example would be http://test.com/helloworld.php

 

The server restart is not needed when implementing new scripts, only if the php.ini configuration file is altered.

 

As above script is pure PHP, the php code could be implemented into a HTML document as well as shown in example below.

<html>

<head>

<title>PHP Test 2</title>

</head>

<body>

<?php print "<b>Hello Web!</b>"; ?>

</body>

</html>

 

The result of the above script would be the same as for the pure php from the first example with only one exception that through this way you will be able to combine both HTML and PHP in the same page.

 

(c) Copyright 2003 Oxxus PHP Hosting Services. All rights reserved 


Order with confidence
100% Secure Ordering
Privacy Policy
Money back guarantee


...........................................

 

PHP Tutorials:

What is PHP?

PHP Installation

Using PHP & Cookie

PHP Code Example

GD Library

Connecting MySQL & PHP

Zend Overview

ImageMagick Overview

Using Sablotron XSLT

 

Copyright ® 2003-2007 Oxxus.Net * USA * UK * AUP * Best web hosting solutions from internets leading web hosting provider * Tutorials * Resources * Blog * FAQ