PHP

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 »

Display TIFF Chrome Firefox

Display TIFF Files on a Web Site in Chrome and Firefox

Jump to the Clarity If you need to display TIFF files on the web, you might have problems. TIFF files used to be displayed by all browsers, but as they are not really suitable for web use, support has been dropping. See Image Support by Browser:  https://en.wikipedia.org/wiki/Comparison_of_web_browsers#Image_format_support This makes sense of course, if you are only

Display TIFF Files on a Web Site in Chrome and Firefox Read More »

Visual Studio Code

WordPress IDE – Visual Studio Code

I have decided to test out another WordPress IDE – Visual Studio Code *(or should I do PHP Tools for Visual Studio first?) Step 1: Install the Visual Studio Code IDE from: https://code.visualstudio.com/ References: Autocomplete and snippetrs: https://marketplace.visualstudio.com/items?itemName=tungvn.wordpress-snippet Review with recommended plugins, etc: https://tommcfarlin.com/vs-code-wordpress/ https://code.visualstudio.com/docs/languages/php

WordPress IDE – Visual Studio Code Read More »