PHP & MySQL Practice It Learn It
80 pages
English

Vous pourrez modifier la taille du texte de cet ouvrage

Découvre YouScribe en t'inscrivant gratuitement

Je m'inscris

PHP & MySQL Practice It Learn It , livre ebook

-

Découvre YouScribe en t'inscrivant gratuitement

Je m'inscris
Obtenez un accès à la bibliothèque pour le consulter en ligne
En savoir plus
80 pages
English

Vous pourrez modifier la taille du texte de cet ouvrage

Obtenez un accès à la bibliothèque pour le consulter en ligne
En savoir plus

Description

PHP & MySQL Practice It Learn It: This manual teaches the Programming stuffs in using PHP programming language in an easy-to-follow style. A variety of examples make learning these Concepts with PHP both fun and practical. This manual is organized in such a manner that students and programmers with basic prior knowledge of Programming can find it easy, crisp and readable. Each Chapter contains many example programs throughout the book, along with additional examples for further practice.

KEY FEATURES
Systematic approach throughout the book

Programming basics in PHP without requiring previous experience in another language

Simple language has been adopted to make the topics easy and clear to the readers

Topics have been covered with numerous illustrations and tested PHP programs

Enough examples have been used to explain various Programming Constructs effectively. This book also consists of tested programs so as to enable the readers to learn the logic of programming

Discusses all generic concepts of Computer Programming concepts such as Conditional and Looping Structures and Array in detail with aided examples

Use of Various Programming terms like variables and expressions, functions are simplified

A number of diagrams have been provided to clear the concepts in more illustrative way

Samples are presented in easy to use way through Wamp.

Sujets

Informations

Publié par
Date de parution 10 mars 2013
Nombre de lectures 6
EAN13 9781456614423
Langue English

Informations légales : prix de location à la page 0,0174€. Cette information est donnée uniquement à titre indicatif conformément à la législation en vigueur.

Extrait

PHP & MySQL Practice It Learn It
By Jitendra Patel

Overview

PHP & MySQL Practice It Learn It: This manual teaches the Programming stuffs in using PHP programming language in an easy-to-follow style. A variety of examples make learning these Concepts with PHP both fun and practical. This manual is organized in such a manner that students and programmers with basic prior knowledge of Programming can find it easy, crisp and readable. Each Chapter contains many example programs throughout the book, along with additional examples for further practice.

KEY FEATURES
Systematic approach throughout the book
Programming basics in PHP without requiring previous experience in another language
Simple language has been adopted to make the topics easy and clear to the readers
Topics have been covered with numerous illustrations and tested PHP programs
Enough examples have been used to explain various Programming Constructs effectively. This book also consists of tested programs so as to enable the readers to learn the logic of programming
Discusses all generic concepts of Computer Programming concepts such as Conditional and Looping Structures and Array in detail with aided examples
Use of Various Programming terms like variables and expressions, functions are simplified
A number of diagrams have been provided to clear the concepts in more illustrative way
Samples are presented in easy to use way through Wamp.
Copyright © 2012 Jitendra Patel PHP & MySQL Practice It Learn It
All rights reserved. No part of this book shall be reproduced, stored in a retrieval system, or transmitted by any means, electronic, mechanical, photocopying, recording, or otherwise, without written permission from the publisher. No patent liability is assumed with respect to the use of the information contained herein. Although every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions. Nor is any liability assumed for damages resulting from the use of the information contained herein.
Warning and Disclaimer
Every effort has been made to make this book as complete and as accurate as possible, but no warranty or fitness is implied. The information provided is on an "as is" basis. The authors and the publisher shall have neither liability nor responsibility to any person or entity with respect to any loss or damages arising from the information contained in this book.
Section 1: Getting Started with PHP.

What is PHP?
PHP - Hypertext Preprocessor (or) Personal Home Page. PHP is a Scripting Language.
PHP Scripting Language is of 3 types.
a) Command Line Scripting
b) Desktop/GUI Based Applications - Graphical User Interface
c) Web Applications
The main purpose of PHP language is to develop web applications. A web application is a request, response mechanism (or) a client server methodology. The programs present in the client machine to send a request to the server, to send data to the server and also to get the response from server is known US client side program (Browser).
The programs present in the server machine to receive the request from the client, to process the request and to give and appropriate response back to the client is known as server side applications.
PHP Language is used for developing server side applications.
Tools -> Internet Options -> Language.
HTTP Request + HTTP Response.
When a client is sending a request HTTP protocol will create an HTTP request object which contains all the HTTP details of the client and that object will be sent to the server, there it get process an HTTP response object gets created and that object will come to the client side.

Features of PHP
PHP Scripts are being encoded in the server side like ASP.
Another future of PHP is PHP can work with most of the database My SQL, Oracle, SQL Server etc.
PHP is an open source product. PHP can be downloaded free of cost.
PHP applications are platform independent that means if you develop a PHP application in one operating system. That application you can run in any other operating system.
PHP applications can be deployed in most of the web servers like IIS, APACHE, Personal Web Server, Samba Server etc.
A web server is an application running in the server machine capable of receiving HTTP request every web server is identified with a specific port.
Port Number means Server Identification Number.

History of PHP
PHP succeeds an older product, named PHP/FI.
PHP/FI was created by Rasmus Lerdorf in 1995.
PHP/FI was introduced in November 1997 using C language.
PHP/FI stands for Personal Home Page / Forms Interpreter.
PHP/FI was introduced from PERL scripting language.
PHP 3.0 was introduced in 1998 by Andi Gutmans and Zeev Suraski.
PHP 4.0 was introduced in 2000.
PHP 5.0 was released in 2004.
A PHP program gets encoded in the server and will give the response back to the client in pure HTML.

Relationship between Apache, MySQL and PHP (AMP Module)
AMP stands for Apache web server, MySql Database, and PHP or Perl or Python language.
PHP, MySQL, and Apache are the three most commonly used open source tools in their categories (web scripting languages, databases, and web servers) which are widely used.
PHP is used to create Web pages; MySQL is used to create database for the storage of website data and Apache is used to run PHP pages (scripts).
The combination of these three allows us to create dynamic and interactive websites. It can be used on cross platform means we can install these on Windows platform(known as WAMP) or Linux platform(known as LAMP)
Being open source means that they have been developed in the community by teams of programmers writing the features they themselves want and need, with the original code available for all to see and change. Bugs can be found and security breaches can be prevented before they happen.
There’s another benefit: all these programs are free to use. There’s no worrying about having to purchase additional licenses if you have to scale up your website and add more servers. And you don’t need to check the budget before deciding whether to upgrade to the latest versions of these products.
Probably the LAMP model has more profound influence on the information industry than anything else in the open source community, particularly in this age of World Wide Web. The acronym LAMP refers to a set of OSS programs used together to support dynamic websites or servers.
The L in the acronym stands for the Linux operating system, which serves as the core of the LAMP model; the A represents the Apache Web server, which makes dynamic websites available from the Linux server so that users can access and interact with the Web pages with their Web browsers;
The M refers to the database server MySQL, which is necessary for developing dynamic database-driven Websites;
The P stands for one or more of the following scripting and programming languages: PHP, Python, or Perl, which can be used to create interactions between the end-users and the databases.

Structure of PHP Program

Zend Engine can also be called as parser.
The Zend Engine converts a PHP program to HTML.
PHP Scripts are used for developing
Server Side Applications – PHP parser, a web server and a browser in the client side is required
Command Line Scripting – only PHP parser is required.
Desktop or GUI Applications – PHP – GTK is used for developing GUI applications.
GTK stands for GIMP Tool Kit.
GIMP stands for GNU Image Manipulation Program.

Installing a WAMP on Windows
You need several components to build your own PHP development system. PHP development is often done with either a system called LAMP (Linux, Apache, MySQL, and PHP) or WAMP (Windows, Apache, MySQL, and PHP).
There are several available WAMP servers, each offering slightly different configurations. Here’s a selection of the best in my opinion:
WAMPServer: http://wampserver.com/en/
XAMPP: http://apachefriends.org/en/xampp.html
Glossword WAMP: http://glossword.biz/glosswordwamp/
EasyPHP: http://easyphp.org.
Follow the download link and you’ll be taken to the SourceForge download area. The version used in this book is WampServer2.0i.exe, which is about 15.6 MB in size.
Once you’ve downloaded the file, run the installer and follow the prompts, accepting the defaults you are given as follows:










Upon completion, WampServer will load and an icon will be added to your System Tray, at the bottom right of your screen.


Indicates WampServer is running all services
Indicates WampServer is not running all services
Double-click the System Tray icon and the control window will pop up.

From here, you can start, stop, and restart both Apache and MySQL. Sometimes you may find that the initial installation will not correctly start one or the other program, so if you don’t see a green traffic light next to one, select Restart to get it going.

Testing the Installation
The first thing to do at this point is verify that everything is working correctly. To do this, you are going to try to display the default web page, which will have been saved in the server’s root folder. Enter either of the following two URLs into the address bar of your browser:
http://127.0.0.1/
http://localhost/
The first is the IP address that all computers use to refer to themselves. The second is an alias, which refers to exactly the same thing and is available for ease of use.
If all is well, you will see the default WampServer home screen as follows.

Assuming that you have been successful so far, you now need to perform one more task in order to have your development server fully operational. So create a folder on your hard disk called c:\wamp\www\yourfoldername.
If you will be maintaining several projects, at some point you may wish to create all the directories you will need and

  • Univers Univers
  • Ebooks Ebooks
  • Livres audio Livres audio
  • Presse Presse
  • Podcasts Podcasts
  • BD BD
  • Documents Documents