Performing File Operations in PHP

In this article, I will discuss Performing File Operations in PHP. Since file handling is an important feature in many applications. So, all programming languages offer a library of in-built functions for file handling. As a matter of fact, PHP provides a number of methods to create, read, and manipulate files and directories. The following …

A Brief Description of move_uploaded_file() Function in PHP

This article presents A Brief Description of move_uploaded_file() Function in PHP. For the purpose of uploading a file, we use the move_uploaded(_file() function. Basically, it takes two parameters as the input. While the first parameter indicates the name of the uploaded file. Similarly, the second parameter indicates the location to which the file needs to …

Example of Uploading Files in PHP

An Example of Uploading Files in PHP is shown here. Applications and Use of Uploading Files in PHP Because many dynamic applications provide features for users to upload files, it is one of the most essential functions of a web application. Significantly, many CMS (Content Management Systems) allows administrators to upload images as well as …

Understanding Cookies in PHP

As a matter of fact, understanding Cookies in PHP requires learning to use the setcookie() method. Cookies in PHP allow us to store a small amount of client information. In fact, cookies are very useful in tracking users. A website may want to know the navigation behavior of its users. So, cookies help website administrators …

Examples of Global Variables in PHP

In this article on Examples of Global Variables in PHP, I will explain how to create and use global variables. Basically, there are 9 superglobals in PHP which remain available throughout the scripts. In other words, these superglobals can be accessed in any part of the script. These superglobals include $GLOBALS, $_SERVER, $_POST, $_GET, $_REQUEST, …

Creating Classes in PHP

This article explains Creating Classes in PHP. Basically, a class is like a template or a blueprint for an object. In other words, a class describes an object. While objects are things that have certain features in terms of attributes and behavior. The class represents the attributes and behavior of objects and the objects are …

Inheritance in PHP

In this article, I will explain the Inheritance in PHP. The objects relate to each other in many ways. For instance, an object may be a special kind of another object. In other words, the object is the special case of some generalized object. For example, a Course object can have attributes like course title, …

Anonymous Functions in PHP

In this article, I will explain how to create Anonymous Functions in PHP. Anonymous functions are those functions that we create without a name. In fact, we can use anonymous functions in a number of places. For instance, suppose we need to pass a function as a parameter to another function. In such a case, …