Presentation is loading. Please wait.

Presentation is loading. Please wait.

ALWAR INSTITUTE OF ENGINEERING & TECHNOLOGY

Similar presentations


Presentation on theme: "ALWAR INSTITUTE OF ENGINEERING & TECHNOLOGY"— Presentation transcript:

1 ALWAR INSTITUTE OF ENGINEERING & TECHNOLOGY
A PTS REPORT ON PHP AT XTVISTA, NOIDA Presented By: FACULTY CO-ORDINATOR: SUMIT SHARMA NEETU YADAV B.TECH 4TH YR, 7TH SEM I.T.

2 ABOUT THE COMPANY: XTVISTA
XTVISTA offers a wide spectrum of technical courses and application courses designed to suit every skill level, as well as the ability to consult directly with organizations to tailor made learning plans for any number of employees. XTVISTA products and services have a wide appeal and are applicable those in varied positions including network administrators, systems analysts, systems architects,  test engineers, software developers, help desk staff, IT managers, senior executives, administrative assistants and business professionals.

3 TRAINING IN COMPANY The Company also provides educational trainings to students in various technologies like -> c/c++ .NET TECHNOLOGY JAVA TECHNOLOGY+ PHP++ADVANCE RED HAT LINUX VLSI TECHNOLOGY EMBEDDED SYSTEMS ORACLE+ etc.

4 Presentation Outline MEANS OF PHP WHAT IS PHP HISTORY OF PHP WHY PHP
INTRODUCTION TO HTML ADVANTAGES OF PHP

5 MEANS OF PHP Meaning of Hypertext Preprocessor:
PHP stands for PHP: Hypertext Preprocessor PHP Hypertext Preprocessor is a widely used, general-purpose scripting language that was originally designed for web development. Meaning of Hypertext Preprocessor: Hypertext Preprocessor has no specific meaning but It is commonly used to extract data out of a database and present it on the Web page. PHP can also be used to connect to a database; to retrieve, add or update content. This makes PHP an ideal language for creating large-scale websites. The output from the PHP functions on the page are typically returned as HTML code, which can be read by the browser. NT/2000 and Unix Web servers support the language, and it is widely used with the M SQL database.

6 WHAT IS PHP? PHP is an open-source server-side, HTML embedded scripting language. The goal of the language is to allow Web developers to write dynamically generated pages quickly. The primary advantage to server-side scripting is the ability to highly customize the response based on the user's requirements, access rights, or queries into data stores. Originally designed as a high level scripting language for producing dynamic web pages that are generated from information accessed from a My SQL database. A dynamic Web page interacts with the user, so that each user visiting the page sees customized information.

7 HISTORY OF PHP PHP originally stood for personal home page. This is the first use of the name "PHP". First version of PHP (1.0)– designed by Rasmus Lerdorf in June written in the C programming language. Next version of PHP (2.0)– launched in November 1997. Next release of PHP 3(3.0) launched in June 1998. In May 2000 – PHP 4(4.0) powered by Zend Engine1.0 was released. (More advanced two-stage parse/execute tag-parsing system called the Zend engine.) In July 2004 – PHP 5(5.0) was released powered by Zend Engine II. In June 2009 – PHP 5(5.3) was released. Now PHP6.0 is released.

8 WHY PHP? In an HTML page, PHP code is enclosed within special PHP tags. When a visitor opens the page, the server processes the PHP code and then sends the output (not the PHP code itself) to the visitor's browser. It means that, unlike Java script, we don't have to worry that someone can steal our PHP script. PHP is compatible with almost all servers used today like apache. PHP is easy to learn and runs efficiently on the server side. PHP runs on different platforms like Linux, Windows, Unix. PHP is free software released under the PHP License, which is incompatible with the GNU General Public License (GPL) because of restrictions on the use of the term PHP. PHP offers excellent connectivity to many databases including My SQL, Informix, Oracle, Sybase, Solid, Postgre SQL.

9 Introduction to HTML HTML stands for HYPER TEXT TRANSFER PROTOCOL
HTML was first introduced on the internet by Berners-Lee in late 1991. HTML is a language used for describing web pages. HTML markup tags are usually called html tags.

10 Structure of an HTML document
<head> <title>Title of page</title> </head> <body> This is an example of simple<b>HTML document</b> </body> </html>

11 OUTPUT

12 Advantages of PHP Open-source
Easy to use ( C-like and Perl-like syntax) Stable and fast Multiplatform Many databases support Many common built-in libraries Pre-installed in Linux distributions

13 PHP - What it do? Client from browser send HTTP request (with POST/GET variables) Apache recognizes that a PHP script is requested and sends the request to PHP module PHP interpreter executes PHP script, collects script output and sends it back Apache replies to client using the PHP script output as HTML output Load PHP File Web Page Request PHP Engine – Run Script PHP Results HTML Response

14 PHP Momentum

15 Steps to using PHP PHP documents are text files that can be created with any text editor. (A “real” code editor such as Ace HTML is better.) Figure out where to store PHP documents. With the Windows IIS server, they are stored in /Inetpub/www root. Create and edit PHP documents in an editor. Execute the documents from your browser. With Windows IIS the “URL” is localhost/{PHP file name}. Make required changes in your editor and “refresh” the application in your browser.

16 PHP Status on the Internet

17 Apache and PHP When a file ends in .php, is not simply sent down the http connection like other files. Instead, apache reads the file. If it finds PHP parts in the file, it sends them to the PHP processor. This processor is a model that lives inside Apache.

18 The Magic of PHP The client never sees the PHP code. It only sees what the PHP processor has done with the code. You can write normal HTML code, and you can switch to writing PHP code pretty much at any stage. You can have several PHP parts. PHP parts can not be nested. The contents of the PHP part can be called a PHP script.

19 Statements Like a normal text is split into sentences, a PHP script is split into statements. A PHP script contains 1 or more statements. Each statements tells the interpreter something. Each statement is ended by a semicolon. In our first script there is only one statement. Think of a statement like a rule in CSS. But never forget the semicolon!

20 Expressions The stuff before the semicolon is called an expression.
You can think of an expression as anything anyone may want to write in a computer program. So an expression is just a way to talk about “stuff” in a program in a more edifying way than just calling it “stuff”.

21 Functions phpinfo() is a function.
Functions are one of the most fundamental concepts in computer programming. A function is an expression that does something to something else. The “something else” is in the parenthesis. It is called the argument of the function. phpinfo() is a function. Its argument is empty.

22 A quick example <html> <head>Test page</head>
<body> The time is now <?php echo date(); ?> <hr> </body> </html>

23 A quick example <html> <head>Test page</head>
<body> The time is now <?php here we “jump into” php echo date(); ?> here we “jump” back out <hr> </body> </html>

24 Running PHP Application
WEB BROWSER HTTP Request SQL APACHE HTTP Response Windows OS PHP SQL UQERY RESULT SET LINUX OS CLIENT SERVER

25 WHAT IS A SESSION VARIABLE
Session variables are used to store information for a particular period of time. The values in session variables exist only till the session exists. They are used to carry information from one page to another of a web site. We can create a session using a session identifier and store it in the server. When the client makes any request, the data stored in the session variable can be accessed by PHP any number of times until the session is ended.

26 NEED OF SESSION VARIABLE
In web sites, passing information between pages using a query string is very difficult. For example once you log into a site, passing the username to all the pages of the site using query string is very difficult, but this can be done easily using Session variables. These variables can be used to pass information from one page to another without using a query string, since it is easy to maintain and retrieve.

27 HOW SET SESSION VARIABLE
Session variables can set using 'session_register‘ function in PHP as shown below: Syntax: session_register("string"); // string - mention the name of the session variable Example: session_register("Username"); Username - name of the session variable

28 DESTROY SESSION VARIABLE
They can be destroyed using 'session_destroy' function. This is used to end a session when the user logs out. The code for destroying all the session variables stored in the server is given below: Syntax: session_destroy(); Example: session_destroy(); session_unregister("string"); //string - name of the session variable Example: session_unregister("Username"); Username - name of the session variable

29 WHAT IS A COOKIE. A cookie is flat file based system used to represent a user of the website. It is stored on the local computer of the user. When you visit a website a cookie may be set to represent the user. Next time he visits the website, he does not need to identify himself manually; instead the cookie will represent him on that website. With the help of PHP, cookies can be created, read and destroyed.

30 THANK YOU QUERIES


Download ppt "ALWAR INSTITUTE OF ENGINEERING & TECHNOLOGY"

Similar presentations


Ads by Google