Articles by category: PHP

Create thumbnails with php

Posted in PHP, Jun 1 2018
Create thumbnails with php

A script to create a thumbnail image from source image using PHP GD and Image Functions - create a new image from file or URL, (PHP 4, PHP 5, PHP 7).

Check if php is running from command line interface (cli)

PHP scripts are usually opened in a web browser. But they can be run from command line or terminal as well.

PHP - Get filename from file path

PHP pathinfo(), returns information about a file path, from php 5.2.0 PATHINFO_FILENAME constant was added which returns the filename from file path with the file extension removed. Example and reference provided.

PHP class - get uri segments

Posted in PHP, Jul 10 2016
PHP class - get uri segments

A Model View Controller(MVC) PHP class to get uri segments which returns a string on success or bool false if key is not found.