Online Tutorials & Training Materials | STechies.com
Register Login
Advertisement

Home » PHP

PHP

Introduction to PHP

PHP stands for Hypertext Processor and is a very powerful, open-source and popular server-side scripting language that is used by developers to create dynamic and interactive web pages. The programming language allows developers to form content that can interact with different databases and is used to develop web-based software applications. The popular programming language is used by the tech giants like Google, Facebook and Yahoo and can be embedded into other front-end technologies like HTML.

Prerequisites to Learn PHP

There is no rule of thumb as to what one should already know before learning PHP. It is advisable to have a basic understanding of the front-end technologies like HTML and CSS in order in order to offer a seamless user experience on a responsive platform. Since PHP serves to establish a connection between content and database, an understanding of the database management system and software like MySQL will also useful.

Even though it is totally optional, a proper understanding of the programming languages like Java, C and C++ can accelerate the process of learning PHP. PHP has the functional units like loops and arrays and thus having even a basic knowledge of the programming languages will obviously help.

Uses of PHP

PHP is a very powerful and a very versatile programming language that can serve a lot of different purposes.

Server-side Scripting: This is the main function of PHP and a developer needs three things to perform it. The developer needs a one PHP parser to convert a human-readable language to a computer-readable form, a web server to execute the files forming the web pages and a web browser to exhibit content or access the program output.

Command-line Scripting: You can execute or run a PHP script without a web browser or a web server and using just a PHP parser. This function of PHP is normally used for simpler text processing tasks.

Desktop Application Development: Another function of PHP is to create client-side applications. Such applications typically have graphical user interfaces. Advanced PHP features can be used to develop such applications.

Graphic Design and Image Processing: PHP scripts are also used for manipulating image content along with text content. Different image processing libraries like ImageMagick, GD Library and Imagine can be integrated into PHP applications that can then manipulate the images.

Characteristics of PHP

PHP is one of the most widely used server-side scripting languages because of the efficient, quick and practical nature of its services.

  • Open Source: Unlike many programming languages, this is an open-source language that can be redistributed and modified freely.
  • Cross Platform: PHP is compatible with all leading web browsers and operating systems like Linux, Unix, MAC OS, Windows, Solaris. This feature of the software easy deployment of various applications across different browsers and operating systems.
  • Fast Performance: PHP scripts can be executed much faster than the ones written in any other scripting language such as JSP or ASP.NET.
  • Simple, Interpreted and Efficient: PHP is very easy to use and even beginners do not need much time to get the hang of it. PHP is an interpreted programming language that does not require compilation. PHP is efficient enough to be used in a multiuser environment. It supports object-oriented programming, has specific features for session management and reference counting and others.

What is a PHP shell?

PHP Shell is a script or program written in PHP (Php Hypertext Preprocessor) which provides us with Linux Terminal (Shell is a vast concept) in Browser. PHP Shell allows user to execute most of the shell commands in browser, some cannot be executed due to PHP limitations.

Basic PHP Syntax

We can insert PHP script or code anywhere in the document. A PHP script or code starts with <?php and ends with ?>:

<?php
PHP code goes here
?>

For Example (PHP Hello World):

<?php
echo "Hello World!";
?>


Advertisement

Tutorials

  • How to display PDF/Word File in browserHow to display PDF/Word File in browser
    In my current project I don't want to keep PDF and DOC file on server or open due to security purpose so I want a system where only login user can view or download the files. so to do this have us ...

  • PHP and SAP integration Requirments
    Only three things required for PHP and SAP integration.Apache HTTP ServerPHP version 4 or 5SAPRFC for PHPSetting PHPRC VariablDocumentRoot "T:/websites"SetEnv PHPRC T:/apache/phpSet my scrip ...

  • Disable form autofill in Chrome for Email and Password autocomplete
    I want to disable form autofill in Google Chrome browser.  The autocomplete="off" tag wont work now. To do this you need to create a extra field with the name email and passw ...

  • How to display an alert message dialogue box using PHP
    Alert boxes are special Java Script dialog boxes supported by the browsers.  PHP does not support any such alert box pop-up messages because as we know PHP is a server-side language ...

  • Undefined index error in PHP
    How to solve undefined index error in PHP? Undefined index error in PHP can be: Notice: Undefined index: search in C:xampphtdocsGooglesearch.php on line 23 Cause of this error: When using ...

  • Advertisement
  • Call To Undefined Function Mysql_connect() error in PHP 7
    After upgrading  to  PHP 7 from PHP 5, I start getting  error PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() This is because mysql_* functions are co ...

  • The editor has encountered an unexpected error.
    While create a blog I received a error msg “The editor has encountered an unexpected error.” with 3 buttons “Attempt Recovery", "Copy Post Text", "Copy Error" ...

  • PHP Filter_var () Function
    What is filter_var? filter_var() is a PHP function used to filters a variable with the help of a specified filter. In PHP programming language we can use filter_var() function to validate and ...

  • How to call a JavaScript function from PHP
    A function is a code block to execute a particular task. To perform that particular task get executed one have to call it. Example of function function func_call(par1, par2){ return par1+par ...

  • Advertisement
  • str_replace Function in PHP
    str_replace() is a PHP in built function. It is used to replace a string occurrence in the given string. It can be in the form of an array or string. Their are four parameters in which ...

  • Your PHP installation appears to be missing the MySQL extension, which is required by WordPress.
    If the following error occurred, which means there is some problem with your PHP version or MySql extension. Your PHP installation appears to be missing the MySQL extension, which is required by Wo ...

Advertisement
Advertisement