Skip to main content

PHP: Notes

Source: https://upload.wikimedia.org/wikipedia/vi/thumb/2/27/PHP-logo.svg/1200px-PHP-logo.svg.png

"PHP was originally an abbreviation of Personal Home Page, but it now stands for the recursive initialism PHP: Hypertext Preprocessor. " — Wikipedia

>>> PHP 8.2 released!

php --version : Check PHP version
php --help
php -S localhost:8000 : Start built-in webserver on port 8000

PHP Global Variables

PHP variables start with $.

Pre-defined, global scope.

$GLOBALS, $_SERVER, $_REQUEST, $_POST, $_GET, $_FILE, $_ENV, $_COOKIE, $_SESSION

PHP Online IDE

https://replit.com/

MVC Frameworks for Building PHP Web Applications

>>> CodeIgniter

>>> CakePHP

>>> Zend

>>> Lavarel

>>> Symphony

>>> Yii

References

PHP Tutorial | w3schools.com

Practice

>>> THM | Linux Backdoors - PHP Backdoors

Popular posts from this blog

Red Hat Enterprise Linux Developer Subscription

subscription-manager register subscription-manager subscribe subscription-manager list subscription-manager repos --list-enabled

How to charge your device from USB Port

First of all, check BIOS Settings of your laptop or desktop Dell Look for USB PowerShare BIOS Settings: USB PowerShare Lenovo Look for Always On USB Charge in Off Mode BIOS Settings: Enable Always On USB Charge in Off Mode

MySQL: Notes

Ways to check MySQL version mysql --version mysql -V dpkg -l 'mysql-sever' mysql -u root -p How to check MySQL version: mysql --version Database folder On Microsoft Windows, by default, MySQL save databases in this folder: %ProgramData%\MySQL\MySQL Server 5.5\data Check databases' size SELECT table_schema AS "Database name", SUM(data_length + index_length) / 1024 / 1024 AS "Size (MB)" FROM information_schema.TABLES GROUP BY table_schema; Export database schema $ mysqldump -u root -p --no-data wordpress1001 > c:\backup\schema-wordpress1001.sql Enter password: **************** Create a dedicated user to backup databases Give credit to: http://www.fromdual.com/privileges-of-mysql-backup-user-for-mysqldump Create dedicated mysql user and grant privileges to run backup $ mysql -u root -p CREATE USER 'backupdb'@'localhost' IDENTIFIED BY 'passwordhere'; GRANT SELECT,SHOW VIEW,RELOAD,REPLICATION CLIENT...