- Server-side scripting: PHP is most commonly used as a server-side scripting language. To make PHP work as a server-side scripting language, all you need is a PHP parser, a Web server, and a Web browser. However, the Web server has to have a connected PHP installation.
- Building client-side GUI applications: Although this is not a preferred use of PHP, with a very good working knowledge of PHP you can build your own client-side GUI applications. You can use PHP-GTK, an extension of PHP, which provides an object-oriented interface for building client-side GUI applications.
- Command-line scripting: Your PHP script can run without any browser or server. In this way, it can be used as a simple and easy-to-use scripting language for tasks such as managing databases and messaging files.
A resource for Learning Programming and Web designing. Collection of articles, tips, tricks, techniques. related to VB.Net,C#, PHP, MsSql, MySql and Windows System related.
Showing posts with label PHP Class. Show all posts
Showing posts with label PHP Class. Show all posts
Monday, 23 January 2012
The three areas where PHP is used
Thursday, 19 January 2012
basic of php
PHP is a
widely-used general-purpose scripting language that is especially suited for
Web development and can be embedded into HTML.
On these blog you find basic help for developing a complete
HTML web site through using of PHP scripting language.
First for download php from these web site.
http://windows.php.net/download/
For run php application on your desktop you need a server to
install and also install PHP.
As my opinion the WAMP server is best and when you install
it the PHP and all nessesary future install it. So you can download wamp server
from http://www.wampserver.com/en/ these
web site. And editor is NetBeans it’s free to download from http://netbeans.org/downloads/ these
site.
PHP stands for Hypertext
Pre-Processor. As is
suggested by the name, PHP is a pre-processor for hypertext. PHP runs on a remote Web server to process
a Web page before it is loaded in a browser. Despite its powerful features,
PHP is quite a simple language that has
been designed specifically for developing and working with Web pages. Its
syntax is similar to that of C and Perl. However, knowledge of both of these
languages is not a prerequisite for getting started with PHP, so you can rest
easy.
Fundamental feature of PHP
- · It is an open source, server-side scripting language.
- · It is operating-system independent and thus can be used on any operating system, including Microsoft Windows, Mac OS, Linux, HP-UX, and Solaris, to name a few.
- · It supports a wide range of Web servers, such as Apache, Microsoft Internet Information Server, Netscape, and iPlanet.
- · It supports a large number of databases, such as MySQL, Ingres, Sybase, Oracle, Base, Informix, FrontBase, and Unix dbm. One of the distinctive features of PHP is that it provides support to database-driven e-commerce Web sites.
- · It is simpler to write codes in PHP than in other scripting languages.
- · It can be used for creating images, reading/writing files, and sending e-mail. To provide these services, PHP communicates with many protocols, such as HTTP, POP3, SNMP, LDAP, and IMAP.
- · In terms of its performance, you can compare PHP with Active Server Pages (ASP). PHP is popular on Linux platforms, as ASP is popular on Windows. However, cross-platform support provided by PHP makes it score over ASP. PHP can be used as effectively on Windows platforms as on any other platform.
- · Unlike many other scripting languages, such as ASP, PHP comes with a built-in compiler that compiles PHP code and can detect errors in it. You can rectify the mistakes in your PHP code based on the mistakes pointed out by the compiler. No such compiler that compiles ASP code is available with ASP.
- · Another significant feature of PHP is its portability. PHP is compatible with any combination of software, and this is what makes it portable. It can work with almost any combination of operating system, Web server, and database server.
New feature
- · Support for Boolean data type. Support for Java and XML. Support for COM/DCOM. This support is available only for Windows. Support for FTP.
- · The '= = =' operator. In addition to checking whether or not the two values are equal, this operator also checks whether the datatypes of these values are the same or not.
- · The ability to call a function even before it is declared. This is accomplished by using the runtime binding of functions in PHP 4.
- · The PHP highlighter. This feature enables you to view the source code instead of the complete script. This feature helps you to have a faster and better look at the source code.
- · Support for variable assignment by reference. This helps you to link two variables so that the value of one variable is dependent on the value of the other variable. Thus, the value of the variable is updated automatically whenever a value is assigned to another variable.
- · Server API (SAPI). This feature further enhances the support for Web servers.
- · Support for many algorithms, namely Triple DES, MD5, Blowfish, and SHA1. Through the mcrypt library, PHP 4 supports full encryption.
- · The ability to reference variables in PHP 4 by using quotes. Additionally, variable expansion is supported using double quotes.
- · The php.ini file is simple to understand and configure.
- · Better ways of creating classes and objects have been introduced.
The basic concept of class in php and make object of class
Basic class definitions begin with the
keyword class, followed by a class name,
followed by a pair of curly braces which enclose the definitions
of the properties and methods belonging to the class.
The class name can be any valid label which is a not a
PHP
reserved word.
A valid class
name starts with a letter or underscore, followed by any number of
letters, numbers, or underscores. As a regular expression, it
would be expressed thus:
[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*.
A class may contain its
own constants, variables
(called "properties"), and functions (called "methods").
the simple example of php class is following.
<?phpclass _DemoCLass{
// property declaration
public $Member1 = 'Value of Member1';
// method declaration
public function DisplayValue() {
echo $this->var;
}
}?>
Note:-
The variable name and class name are case sensitive so when you make object of class that time use in proper way else it's give an error.
The pseudo-variable $this is available when a
method is called from within an object
context. $this is a reference to the calling
object (usually the object to which the method belongs, but
possibly another object, if the method is called
statically from the context
of a secondary object).
Make object of class.
//it's create a new object of
_DemoCLass class
$NewObj = new
_DemoCLass; //call method or function of class
$NewObj ->
DisplayValue();
Subscribe to:
Posts (Atom)