PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages.
This lesson is to explain Introduction to PHP. Our Tutorials website’s main motto is to explain step by step PHP topics with complete examples. As you know that the importance of web development Technology now a days is rapidly expanding its strength around the world.
It is a programming language that is used in web pages’ design and it is ran on the server computer (server side language); That means the internet visitors doesn’t see the actual PHP program, all that they see is html codes, and effects of PHP codes will be appear in html format. So here we have safe programming that nobody can understand what we have written originally!
The PHP programming in the web is similar to C language in the windows or dos, though some differences exist. The syntax are almost the same. It can be ran on the Linux servers on the web and it can be matched with wide range of other servers and web browsers.
I would like to explain and conduct free classes on each and every lesson to help people who wants to choose their career as a PHP Developer. This PHP Tutorials website helps you lot to learn and update yourself various critical issues in your development and learning process. I wish all the best to use this PHP Tutorials online website. If you are a PHP developer just share your programs or solutions here which may help others a lot.
Let’s Get Started
To begin working with PHP you need a host for testing or running and debugging. You can buy it from internet or register a free one. They aren’t hard to get found. Another choice is to make your computer working as a host. In this way your computer host name is ‘local host’ and you can access it usually by typing ‘127.0.0.1’ in one web browser such as ‘Microsoft Internet Explorer’. It’s better to read html tutorial before any web programming, here we don’t spend time for it because of wide range of our discussion. Now let’s start the tutorial!
Thanks and continue reading this PHP Tutorial.
What is PHP?
- PHP stands for “Hypertext PreProcessor.
- PHP is a server side scripting language that is embedded in HTML. It is used to manage dynamic content, databases, session tracking, even build entire e-commerce sites.
- It is integrated with a number of popular databases, including MySQL, PostgreSQL, Oracle, Sybase, Informix, and Microsoft SQL Server.
- PHP scripts are executed on the server
- PHP is pleasingly zippy in its execution, especially when compiled as an Apache module on the Unix side. The MySQL server, once started, executes even very complex queries with huge result sets in record-setting time.
- PHP is free to download and use
- PHP supports a large number of major protocols such as POP3, IMAP, and LDAP. PHP4 added support for Java and distributed object architectures (COM and CORBA), making n-tier development a possibility for the first time.
- PHP is forgiving: PHP language tries to be as forgiving as possible.
- PHP Syntax is C-Like.
- PHP is free to download.
PHP is an amazing and popular language!
It is powerful enough to be at the core of the biggest blogging system on the web !
It is deep enough to run the largest social network Like Facebook!
It is also easy enough to be a beginner’s first server side language!
What is a PHP File?
- PHP files have extension “.php”
- PHP code are executed on the server, and the result is returned to the browser as plain HTML
What Can PHP Do?
- PHP can generate dynamic page content
- PHP can create, open, read, write, delete, and close files on the server
- PHP can send and receive cookies
- PHP can collect form data
- PHP can add, delete, modify data in your database
- PHP can encrypt data
- PHP can be used to control user-access
With PHP you are not limited to output HTML. You can output images, PDF files, and even Flash movies. You can also output any text, such as XHTML and XML.
Why PHP ?
- PHP runs on various platforms like Windows, Linux, Unix, Mac OS X, etc.
- PHP is compatible with almost all servers used today (Apache, IIS, etc.)
- PHP supports various databases like MS-Access, MySQL and SQLite etc.
- No need to pay anything for PHP
- PHP can be downloded directly from http://php.net website.
- PHP syntax like basic C – language. It is easy to learn.
What we need?
Install a Web Server (Ex: Apache)
Install a database. (Ex: MySQL)
You can install directly any of the following software to work with all the above requirements. The softwares will reduce our work to install each and every software individually. The softwarea are even light weight to install and run. See, there are various softwares available for PHP development.
I use Apppserv software in my example to explain all examples in our discussion.
echo “My first PHP script”;
The best things in using PHP are that it is extremely simple for a newcomer, but offers many advanced features for a professional programmer. Don’t be afraid reading the long list of PHP’s features. You can jump in, in a short time, and start writing simple scripts in a few hours.
Although PHP’s development is focused on server-side scripting, you can do much more with it. Read on, and see more in the What can PHP do? section, or go right to the introductory tutorial if you are only interested in web programming.