We have seen file upload using PHP in previous tutorials PHP file upload but in this tutorial we will see how to save files to MySQL database using PHP. You may be wonder why you would need to save file content into database rather than just into the file system. In situations where PHP application needs to […]
PHP multiple files upload example will show you how to upload multiple files using PHP. In this example the files are selected using the browse buttons and files are uploaded to the ‘uploads’ directory under root project directory. PHP script stores the files into the defined location and returns response as a success or failure […]
In this tutorial we will see the integration of AngularJS with PHP REST. We are going to create CRUD application using PHP REST API on server side and AngularJS is encapsulated within html file on client side. Thus the client will communicate with server asynchronously using AngularJS $http service. Please read REST API CRUD Example […]
In this tutorial I am going to show you how we can work with RESTful webservice or REST webservice in PHP PDO, MySQL. Introduction The most important concept in REST is resources, which are identified by global IDs — typically using URIs. Client applications use HTTP methods (GET/ POST/ PUT/ DELETE) to manipulate the resource […]
Introduction In this example we will see how to detect Operating System using PHP technology. We are going to use browser’s HTTP_USER_AGENT that gives lots of information about the operating system but here we will only detect operating system type, such as, Windows, Mac, Linux, Ubuntu, Mobile etc. We won’t detect further details, such as, […]
In this post I will show how we can remove the version number from CSS & JS files. Many css and js files in the WordPress have the WordPress version number appended to their source. Therefore to improve the speed of website as much as possible we need to remove query strings from css and […]
In this example, I will explain how to create a zip file of multiple files using PHP. Create below function to create a zip file from multiple files.
Introduction PHP file upload example will show you how to upload a file using PHP. In this example the file is selected using the browse button and file is uploaded to the uploads directory. PHP script stores the file into the defined location and returns response as a success or failure message from the PHP […]
This tutorial shows an example how to sort an array using asort() function available in PHP. The asort() function sorts an array by maintaining the index association. This function sorts an array such that array indices maintain their correlation with the array elements they are associated with. This is used mainly when sorting associative arrays […]
This tutorial shows an example how to sort an array using natsort() function available in PHP. The natsort() function sorts an array using natural order sorting algorithm. This function implements a sorting algorithm that orders alphanumeric strings in the way a human being would read while maintaining key/value associations.