Welcome To 'Scripters Paradise'
November 18, 2017, 03:19:03 pm
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Please Read Our Vision Statement.
Welcome To Our Newest Member: W14OK
 
  Home Help Search Gallery Flyfamilyguy WebSite Staff List Calendar Login Register  

The Real Tutorial For PHP

Pages: [1]   Go Down
  Print  
Author Topic: The Real Tutorial For PHP  (Read 421 times)
Michaela
Global Moderator
Wannabe
*
Offline Offline

Posts: 4


View Profile WWW
« on: April 06, 2008, 06:41:43 pm »

This Post Will Hold Many Tutorials. Pleast Stand By.

It's Recemended To read this post before you begin this tutorial: http://geeksrus.smfforfree3.com/index.php/topic,4.0.html

~_~_~_~_~_~_~_~_~_~_~_~_~_~__~_~_~_~_~_

Install PHP

What do You Need?
This tutorial will not explain how to install PHP, MySQL, or Apache Server.

If your server supports PHP - you don't need to do anything! You do not need to compile anything or install any extra tools  - just create some .php files in your web directory - and the server will parse them for you. Most web hosts offer PHP support.

However, if your server does not support PHP, you must install PHP. Below is a link to a good tutorial from PHP.net on how to install PHP5:

http://www.php.net/manual/en/install.php

Download PHP
Download PHP for free here: http://www.php.net/downloads.php

Download MySQL Database
Download MySQL for free here: http://www.mysql.com/downloads/index.html

Download Apache Server
Download Apache for free here: http://httpd.apache.org/download.cgi
~_~_~_~__~_~_~_~_~_~_~__~_~_~__~_~_~_~_~_~_~_~_~_~_~_~

Basic PHP Syntax

A PHP scripting block always starts with <?php and ends with ?>. A PHP scripting block can be placed anywhere in the document.

On servers with shorthand support enabled you can start a scripting block with <? and end with ?>.

However, for maximum compatibility, we recommend that you use the standard form (<?php) rather than the shorthand form.

Code:
<?php?>

A PHP file normally contains HTML tags, just like an HTML file, and some PHP scripting code.

Below, we have an example of a simple PHP script which sends the text "Hello World" to the browser:


Code:
<html>
<body><?php
echo "Hello World";
?>
</body>
</html>

Each code line in PHP must end with a semicolon. The semicolon is a separator and is used to distinguish one set of instructions from another.

There are two basic statements to output text with PHP: echo and print. In the example above we have used the echo statement to output the text "Hello World".


Comments in PHP

In PHP, we use // to make a single-line comment or /* and */ to make a large comment block.

Quote
<html>
<body><?php//This is a comment/*
This is
a comment
block
*/?></body>
</html>

** WIll Be Finishing this tutorial Soon **
Report Spam   Logged

Social Buttons



Pages: [1]   Go Up
  Print  
 
Jump to:  

Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum | Buy traffic for your forum/website

Powered by SMF | SMF © 2016, Simple Machines
Page created in 0.062 seconds with 11 queries.