Download CLIENTS AND SERVERS Web programming languages are usually

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

URL redirection wikipedia , lookup

Transcript
CLIENTS AND SERVERS
Web programming languages are usually classified as server-side or client-side. Some
languages, such as JavaScript, can be used as both client-side and server-side
languages,
but most Web programming languages are server-side languages.
_ The client is the Web browser, so client-side scripting uses a Web browser to run
scripts.
The same script may produce different effects when different browsers run it.
_ A Web server is a combination of software and hardware that outputs Web pages
after
receiving a request from a client. Server-side scripting takes place on the server. If you
look at the source of a page created from a server-side script, you'll see only the HTML
code the script has generated. The source code for the script is on the server and
doesn't
need to be downloaded with the page that's sent back to the client.
_ Web Programming Languages
_ PHP
_ ASP
_ Perl
_ JAVA
Introduction to PHP
_ PHP can be installed on any web server: Apache, IIS, Netscape, etc…
_ PHP can be installed on any OS: Unix, Linux, Windows, MacOS, etc…
_ XAMPP is a free and open source cross-platform web server package, consisting
mainly of the
Apache HTTP Server, MySQL database, and interpreters for scripts written in the PHP
and Perl
programming languages.
_ It is used as a development tool, to allow website designers and programmers to test
their work
on their own computers without any access to the Internet. .
_ XAMPP's name is an acronym for:
_ X (meaning cross-platform)
_ Apache HTTP Server
_ MySQL
_ PHP
_ Perl
_ LAMP package is used for Linux OS
_ WAMP package is used for Windows OS
PHP is a powerful server-side scripting language for creating dynamic
and interactive websites.
_ PHP is the widely-used, free, and efficient alternative to competitors
such as Microsoft's ASP. PHP is perfectly suited for Web development
and can be embedded directly into the HTML code.
_ The PHP syntax is very similar to Perl and C. PHP is often used together
with Apache (web server) on various operating systems. It also supports
ISAPI and can be used with Microsoft's IIS on Windows.
_ A PHP file may contain text, HTML tags and scripts. Scripts in a PHP
file are executed on the server.
_ What is a PHP File?
_
•PHP files may contain text, HTML tags and scripts
_
•PHP files are returned to the browser as plain HTML
_ •PHP files have a file extension of ".php", ".php3", or ".phtml"
What is PHP?
_ PHP stands for PHP: Hypertext Preprocessor
_ PHP is a server-side scripting language, like ASP
_ PHP scripts are executed on the server
_ PHP supports many databases (MySQL, Informix, Oracle, Sybase,
Solid, Postgre SQL, Generic ODBC, etc.)
_ PHP is an open source software (OSS)
_ PHP is free to download and use
_ Created in 1994
_ Syntax inherited from C, Java and Perl
_ Powerful, yet easy to learn
Why PHP?
_ PHP runs on different platforms (Windows, Linux, Unix, etc.)
_ PHP is compatible with almost all servers used today (Apache, IIS, etc.)
_ PHP is FREE to download from the official PHP resource: www.php.net
_ PHP is easy to learn and runs efficiently on the server side
Diff Between php4 andphp5
There are several differences between PHP4 and
PHP5
_
1.Unified constructor and Destructor
_
2.Exception has been introduced
_
3.New error level named E_STRICT has been introduced
_
4.Now we can define full method definitions for a abstract class
_
5.Within a class we can define class constants
_
6.we can use the final keyword to indicate that a method cannot be
overridden by a child
_
7.public, private and protected method introduced
_
8.Magic methods has been included
_
9.we can pass value by reference
PHP as a Scripting Language
_ PHP, or PHP: Hypertext Preprocessor, is a widely used, generalpurpose
scripting language that was originally designed for web
development, to produce dynamic web pages. It can be embedded
into HTML and generally runs on a web server, which needs to be
configured to process PHP code and create web page content from it. It
can be deployed on most web servers and on almost every operating
systemand platform free of charge. PHP is installed on over 20 million
websites and 1 million web servers
_ PHP was originally created by Rasmus Lerdorf in 1995 and has been in
continuous development ever since. The main implementation of PHP
is now produced by The PHP Group and serves as the de
facto standard for PHP as there is no formal specification. 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 Syntax
Comments in PHP
•In PHP, we use // to
make a single-line
comment or /* and */
to make a large
<html>
<body>
<?php
//This is a comment
/*
This is
comment block.
a comment
block
*/
?>
</body>
</html>
PHP Syntax
Comments in PHP
•In PHP, we use // to
make a single-line
comment or /* and */
to make a large
<html>
<body>
<?php
//This is a comment
/*
This is
comment block.
a comment
block
*/
?>
</body>
</html>
Names (also called identifiers)
_ Must always begin with a dollar-sign ($)
_ generally start with a letter and can contain letters,
numbers, and underscore characters “_”
_ Names are case sensitive
_ Values can be numbers, strings, boolean, etc
_ change as the program executes