php training report
Post on 11-Oct-2015
89 Views
Preview:
DESCRIPTION
TRANSCRIPT
-
5/21/2018 Php Training Report
1/17
A
REPORT
ON
PHP&MYSQL
ELPIS TECNOLOGIES
Submitted to
Department of Computer Science & Engineering
In partial fulfilment of the requirements
For the degree of
BACHELOR OF TECHNOLOGY
IN
COMPUTER SCIENCE
By
VIKAS YADAV
Roll No.0924010126
Under the guidance ofMrs Payal Kansal
Sunderdeep Engineering College
-
5/21/2018 Php Training Report
2/17
DECLARATION
We hereby declare that this submission is our own work and that, to the best of our
knowledge and belief, it contains no material previously published or written by another neither
person nor material which to a substantial extent has been accepted for the award of any other
degree or diploma of the university or other institute of higher learning, except where due
acknowledgment has been made in the next.
Name : Vikas YadavRoll No.: 092410126Date : 11/11/13
3
-
5/21/2018 Php Training Report
3/17
ACKNOWLEDGEMENT
I take this opportunity to bestow, form my heart, my deep sense of gratitude and indebtedness to my
Mrs. Payal Kansal for her valuable and continuous encouragement. I am grateful to her for her
tireless and consistent supervision and help she rendered to me throughout the course of my
experimentation and subsequently in my preparation of this dissertation. I am thankful to DEV SIR
CEO of ELPIS TECNOLOGIES. , for their unconditional and most willing support during
preparation of the project report.
VIKAS YADAVSDEC GHAZIABAD
4
-
5/21/2018 Php Training Report
4/17
ABOUT THE TRAINING
During Industrial Training at ELPIS TECNOLOGIES NOIDA, I studied about Php & Mysql and its
basics.
5
-
5/21/2018 Php Training Report
5/17
TABLE OF CONTENTS
Chapter Title Page no.
Certificate 1
Copy of training certificate 2Declaration 3
Acknowledgement 4
About Training 5
Table of Contents 6
Abstract 7
1.INTRODUCTION 8
Some Basics 9
Operators
SyntaxArrays 10
Functions
2.HTML 12
Heading
Title
Paragraph 13
3.MYSQL 14
Data base
Sql and/or operatorsRDBMS
4. Inroduction to PHP 15
5. Conclusion 17
6. Refrence 18
6
-
5/21/2018 Php Training Report
6/17
Abstract
PHP 5 introduces abstract classes and methods. Classes defined as abstract may not be instantiated,
and any class that contains at least one abstract method must also be abstract. Methods defined as
abstract simply declare the method's signature - they cannot define the implementation. When
inheriting from an abstract class, all methods marked abstract in the parent's class declaration must
be defined by the child; additionally, these methods must be defined with the same (or a less
restricted) visibility. For example, if the abstract method is defined as protected, the function
implementation must be defined as either protected or public, but not private. Furthermore the
signatures of the methods must match, i.e. the type hints and the number of required arguments
must be the same. For example, if the child class defines an optional argument, where the abstract
method's signature does not, there is no conflict in the signature. This also applies to constructors as
of PHP 5.4. Before 5.4 constructor signatures could differ.Thats the theory for defining a regular
class in PHP, so lets go one step further and ask ourselves: whats an abstract class? In the simplest
sense, an abstract class is a class that cannot (and should not) be instantiated. This may sound a little
illogical for beginning programmers, but there are situations where this concept makes a lot of
sense.
Anyone who has spent considerable time using the object model provided by PHP 4 knows
what a class is, but just in case youve forgotten this concept, lets go over the basics quickly. InPHP a class is merely a set of statements that perform a specific task, and its definition contains
both properties and methods, which act as the blueprint from which to create - or instantiate -
independent objects.
7
-
5/21/2018 Php Training Report
7/17
CHAPTER-1
Introduction
PHP is aserver-side scripting language designed forweb developmentbut also used as
ageneral-purpose programming language. PHP is now installed on more than 244
millionwebsites and 2.1 millionweb servers.Originally created byRasmus Lerdorf in
1995, thereference implementation of PHP is now produced by The PHP Group. While PHP
originally stood forPersonal Home Page, it now stands forPHP: Hypertext Preprocessor,
arecursive acronym.PHP code isinterpretedby a web server with a PHP processor module,
which generates the resulting web page: PHP commands can be embedded directly into
anHTML source document rather than calling an external file to process data. It has also
evolved to include acommand-line interface capability and can be used
instandalonegraphical applications.
PHP isfree software released under thePHP License,
which is incompatible with theGNU General Public License (GPL) due to restrictions on
the usage of the termPHP. PHP can be deployed on most web servers and also as a
standaloneshell on almost everyoperating system andplatform, free of charge.PHP is anacronym for "PHP Hypertext Pre-processor PHP is a widely-used, open source scripting
language PHP scripts are executed on the server PHP costs nothing, it is free to downloadand use
8
http://en.wikipedia.org/wiki/Server-side_scriptinghttp://en.wikipedia.org/wiki/Web_developmenthttp://en.wikipedia.org/wiki/General-purpose_programming_languagehttp://en.wikipedia.org/wiki/Websitehttp://en.wikipedia.org/wiki/Web_serverhttp://en.wikipedia.org/wiki/Rasmus_Lerdorfhttp://en.wikipedia.org/wiki/Reference_implementationhttp://en.wikipedia.org/wiki/Recursive_acronymhttp://en.wikipedia.org/wiki/Interpreter_(computing)http://en.wikipedia.org/wiki/HTMLhttp://en.wikipedia.org/wiki/Command-line_interfacehttp://en.wikipedia.org/wiki/Computer_softwarehttp://en.wikipedia.org/wiki/Graphical_user_interfacehttp://en.wikipedia.org/wiki/Free_softwarehttp://en.wikipedia.org/wiki/PHP_Licensehttp://en.wikipedia.org/wiki/GNU_General_Public_Licensehttp://en.wikipedia.org/wiki/Shell_(computing)http://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/Computing_platformhttp://en.wikipedia.org/wiki/Computing_platformhttp://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/Shell_(computing)http://en.wikipedia.org/wiki/GNU_General_Public_Licensehttp://en.wikipedia.org/wiki/PHP_Licensehttp://en.wikipedia.org/wiki/Free_softwarehttp://en.wikipedia.org/wiki/Graphical_user_interfacehttp://en.wikipedia.org/wiki/Computer_softwarehttp://en.wikipedia.org/wiki/Command-line_interfacehttp://en.wikipedia.org/wiki/HTMLhttp://en.wikipedia.org/wiki/Interpreter_(computing)http://en.wikipedia.org/wiki/Recursive_acronymhttp://en.wikipedia.org/wiki/Reference_implementationhttp://en.wikipedia.org/wiki/Rasmus_Lerdorfhttp://en.wikipedia.org/wiki/Web_serverhttp://en.wikipedia.org/wiki/Websitehttp://en.wikipedia.org/wiki/General-purpose_programming_languagehttp://en.wikipedia.org/wiki/Web_developmenthttp://en.wikipedia.org/wiki/Server-side_scripting -
5/21/2018 Php Training Report
8/17
Some Basics:
PHP is a scripting languageit gets interpreted instead of being compiled like C++ and Java.
Unlike JavaScript which is executed by the web browser, all PHP code is executed on the web
server. The syntax is very similar to Perl and C. Variables are case sensitive, function names arenot, and statements must be terminated with a semicolon. PHP code should be placed between or tags. The second method is preferred so your scripts are XML
compatible. There is no limitation as to where PHP code can be inserted. To see information about
how PHP is configured, version information, and the settings of all environment variables (e.g.,
HTTP_USER_AGENT and QUERY_STRING), call the phpinfo () function in any script. The
php.ini file is the main configuration file for PHP. It can be edited by the system administrator to
change any of the configuration settings. A change to this file requires the web server be restarted
since the file is only read once when the web server starts up. (The phpinfo() function reports the
location of
Operators:
A. Assignment
1. = += -= /= *= %= ++ -- - like most programming languages.
2. .= - string concatenation operator (see strings section).
B. Arithmetic
1. + - * / % - like most programming languages.
C. Comparison
1. == != < > = - like most programming languages. Also is the same as !=.
2. === - true if arguments are equal and the same data type.
3. !== - true if arguments are not equal or they are not of the same data type.
D. Logical1. && || ! - like most programming languages (&& and || short-circuit)
2. and or - like && and || but have lower precedence than && and ||.
3. xor - true if either (but not both) of its arguments are true.
Syntax:
A PHP script can be placed anywhere in the document.
A PHP script starts with :
9
-
5/21/2018 Php Training Report
9/17
Arrays:
A. Summary of all array functions in the PHP core:
B. Arrays can have any size and contain any type of value. No danger of going beyond array
bounds.
$my array [0] = 25;
$my array [1] = "Bisons";
C. PHP arrays are associative arrays which allow element values to be stored in relation to a key
value
Rather than a strict linear index order.
$capitals ["CO"] = "Denver";
$capitals ["AR"] = "Little Rock"; 6
D. Initialize an array:
$colors = array ("red", "green", "blue");
Print ("The 2nd color is $colors[1]."); // prints green
$capitals = array ("CO" => "Denver", "AR" => "Little Rock");
Print ("$capitals [CO]"); // prints Denver, no quotes around key i
Functions:
A. Functions may be declared anywhere in the source code (i.e., they do not need to be defined
before they
are called as C++ requires).
B. Function names are case-insensitive, though it is usually good form to call functions as they
appear in theirC. Defining and calling
10
-
5/21/2018 Php Training Report
10/17
1. General form:
Function func_name ($param_1, $param_2, ..., $param_n) {
// code
Return $retval; // optional: can return a scalar or an array
}
2. Call: $result = func_name ($arg1, $arg2, ..., $argn);
11
-
5/21/2018 Php Training Report
11/17
CHAPTER-2
Html:
HTML (Hyper Text Mark up Language) is a language for specifying how text and graphics appear
on a web page When you visit a web site (e.g., www.google.com)your web browser retrieves theHTML web page and renders it The HTML page is actually stored on the computer that is hosting
the web site and the page is sent to your browser To see what HTML looks like go to your web
browser View menu and select View Source.
HTML is written in the form ofHTML
elements consisting of tagsenclosed inangle brackets (like ), within the web page content.
HTML tags most commonly come in pairs like and , although some tags
represent empty elementsand so are unpaired, for example . The first tag in a pair is thestart
tag, and the second tag is the end tag(they are also called opening tagsand closing tags). In
between these tags web designers can add text, further tags,comments and other types of text-based
content.
Headings:
HTML allows you to create sections in a document using
Headings, there are six levels of headings
The firstlevel creates the most significant heading, e.g.,
this is a major section
And the sixth level creates the least significant heading, e.g.,
this is a minor section after each heading you insert the text and images that
Pertain to that section, like you would do in MS Word
Title:
A title is usually displayed on the top bar of a web browsers window when you visit a web
12
http://en.wikipedia.org/wiki/HTML_elementhttp://en.wikipedia.org/wiki/HTML_elementhttp://en.wikipedia.org/wiki/Angle_bracketshttp://en.wikipedia.org/wiki/Comment_(computer_programming)http://en.wikipedia.org/wiki/Comment_(computer_programming)http://en.wikipedia.org/wiki/Angle_bracketshttp://en.wikipedia.org/wiki/HTML_elementhttp://en.wikipedia.org/wiki/HTML_element -
5/21/2018 Php Training Report
12/17
Site The title will now be displayed in the main web browser window, just on the top bar
Your title text goes here is the start tag and is the end tag
Paragraph:
The
tag is used to start a paragraph the
tag is used to end a paragraphthe text in
between the two tags is your paragraph ...
the tag is optional, HTML assumes thatYou are in the same paragraph until it encounters the next
tag you can force a line break using
the tag
Body:
Your title goes here
Your content goes here ... Paragraphs, images,
Lists, links, texts, headings, etc.
13
-
5/21/2018 Php Training Report
13/17
CHAPTER-3
Mysql:
MySQL is a fast, easy-to-use RDBMS being used for many small and big businesses. MySQL isdeveloped, marketed, and supported by MySQL AB, which is a Swedish company. MySQL is
becoming so popular because of many good reasons: MySQL is the most popular Open Source
Relational SQL database management system. MySQL is one of the best RDBMS being used for
developing web-based software applications.
Data base:
A database is a separate application that stores a collection of data. Each database has one or more
distinct APIs for creating, accessing, managing, searching and replicating the data it holds. Other
kinds of data stores can be used, such as files on the file system or large hash tables in memory but
data fetching and writing would not be so fast and easy with those types of systems.
Sql and &or operators:
The AND operator displays a record if both the first condition AND the second condition are true.
The OR operator displays a record if either the first condition OR the second condition is true.
Rdbms:
RDBMS stands for Relational Database Management System. RDBMS is the basis for SQL, and
for all modern database systems such as MS SQL Server, IBM DB2, Oracle, MySQL, and
Microsoft Access. The data in RDBMS is stored in database objects called tables. A table is a
collection of related data entries and it consists of columns and rows.
14
-
5/21/2018 Php Training Report
14/17
CHEPTER-4
Introduction to PHP
What You Should Already Know
Before you continue you should have a basic understanding of the following:
HTML CSS JavaScript
If you want to study these subjects first, find the tutorials on ourHome page.
What is PHP?
PHP is an acronym for "PHP Hypertext Preprocessor" PHP is a widely-used, open source scripting language PHP scripts are executed on the server PHP costs nothing, it is free to download and use
What is a PHP File?
PHP files can contain text, HTML, CSS, JavaScript, and PHP code PHP code are executed on the server, and the result is returned to the
browser as plain HTML PHP files have extension ".php"
What Can PHP Do?
PHP can generate dynamic page content PHP can create, open, read, write, and close files on the server PHP can collect form data PHP can send and receive cookies PHP can add, delete, modify data in your database PHP can restrict users to access some pages on your website PHP can encrypt data
With PHP you are not limited to output HTML. You can output images, PDFfiles, and even Flash movies. You can also output any text, such as XHTML and
XML.
15
http://www.w3schools.com/default.asphttp://www.w3schools.com/default.asphttp://www.w3schools.com/default.asp -
5/21/2018 Php Training Report
15/17
Why PHP?
PHP runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.)
PHP is compatible with almost all servers used today (Apache, IIS, etc.)
PHP supports a wide range of databases
PHP is free. Download it from the official PHP resource:www.php.net
PHP is easy to learn and runs efficiently on the server side
16
http://www.php.net/http://www.php.net/ -
5/21/2018 Php Training Report
16/17
CHEPTER-5
Conclusion:
PHP is a great tool for writing dynamic web pages. Non-technical users can easily learn a few
handy tricks to make their web pages easier to manage, and more useful. Because its syntax
resembles most C-like languages, any Computer Science student is able to learn it very quickly.
When creating a PHP enhanced pages, there are a few things we must remember.PHP is a server
side technology, and does not work in a browser. The filename must have .php extension.PHP
enhanced pages can contain a mixture of HTML and PHP code.PHP code must be enclosed in
tag. For more PHP information and tips, please visitphp.net,or do a web search. You'llfind tons of PHP-related material. Happy coding! Do you want your Perl code on one server to call
your PHP functions on another? "Impossible!" you say? Not with XML-RPC. XML-RPC is a
standard way for any application to make requests and receive responses from methods write
17
http://php.net/http://php.net/ -
5/21/2018 Php Training Report
17/17
CHAPTER 6
Reference:
www.php.net
Wikipedia
http://www.w3schools.com/
http://patrickhurley.wordpress.com/mysql-for-oracle-dba
18
http://www.php.net/http://www.w3schools.com/http://patrickhurley.wordpress.com/mysql-for-oracle-dbahttp://patrickhurley.wordpress.com/mysql-for-oracle-dbahttp://patrickhurley.wordpress.com/mysql-for-oracle-dbahttp://www.w3schools.com/http://www.php.net/
top related