<?php foreach (glob(“system/lib/*.php”) as $filename) { include $filename; } ?>
Configure PHP.ini to show errors – Ubuntu | Display All PHP Errors: Basic & Advanced Usage | Enabling PHP error reporting in Ubuntu Apache
Open the php.ini with text editor – For php 7.2 – sudo subl /etc/php/7.2/apache2/php.ini # find and replace display_errors = On display_startup_errors = On You can also do it from your project root index file. Put the following file on your project index.php. error_reporting(E_ALL); ini_set(‘display_errors’, TRUE); ini_set(‘display_startup_errors’, TRUE); Don’t forget to restart apache2.. sudo /etc/init.d/apache2 […]
Get Root Directory Path of a PHP project
Get the document root – $_SERVER[‘DOCUMENT_ROOT’] Get the current file’s folder __DIR__
Can you get a method name from within a method in PHP?
echo “hello from class name: “.__CLASS__.” and method:”.__METHOD__.””.” and with param : “.$param; __CLASS__ retrieves class name and __METHOD__ retrieves method name within the Class
Xampp Warning: Module ‘openssl’ already loaded in line 0
You need to open Xammp folder/php/php.ini and Cntr+F and find extension=php_openssl.dll and uncomment it. ;extension=php_openssl.dll