Web Development

Loading Indicator

Loading Indicator PHP Function (with JS and CSS)

Creating a Loading Indicator with PHP, JavaScript, and CSS A loading indicator is a visual cue that informs users that a process is underway, enhancing user experience by providing feedback during wait times. This snippet demonstrates how to create one using PHP, JavaScript, and CSS. This handy function wraps some HTML, CSS, and JS to create a pulsing circle and […]

Loading Indicator PHP Function (with JS and CSS) Read More »

yannubuntu/boot-repair error

[SOLVED] Cannot add PPA: ppa:yannubuntu/boot-repair error

Yannubuntu Boot-Repair Error Often, when trying to repair the Windows Master Boot Record (MBR) or even modify the boot order on a Ubuntu and Windows dual boot system, it is recommended to use the package “boot-repair”. The first step in this process is adding the repository: sudo add-apt-repository ppa:yannubuntu/boot-repair. However, many people end up getting

[SOLVED] Cannot add PPA: ppa:yannubuntu/boot-repair error Read More »

PHP Current Directory

How to get current directory, filename and code line number in PHP

In PHP, there are several built-in functions that can be used to obtain information about the current script’s directory, filename, and code line number. Getting the Current Directory To get the absolute path of the directory containing the current script, you can use the dirname(__FILE__) function. For example: This will set the $current_directory variable to

How to get current directory, filename and code line number in PHP Read More »

PHP error log - operator not supported

[] operator not supported for strings – PHP

I had a problem with Revolution Slider on a WordPress installation when upgrading to PHP 7.2+. It would generate the error – PHP Fatal error: [] operator not supported for strings in C:[path]\wp-content\plugins\revslider\includes\framework\base-admin.class.php:71 The problem was from the plugin attempting to use the short array push syntax on a string: The solution was to modify

[] operator not supported for strings – PHP Read More »