You are here
Home > featured

PHP Cheatsheet

PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used, free, and efficient alternative to competitors such as Microsoft's ASP. from w3schools Example of several ways of Loop Foreach Loop: foreach ($array as $value) { code to be executed; } example: foreach($ArrayOfObject as $object) { } For Loop: for (initialization;

MySQL Cheatsheet

Login to MySql: mysql -u username -p password Create Database: create database databasename character set utf8 collate utf8_general_ci; grant all on databasename.* to databaseUser@'localhost' identified by 'password'; Delete Database: drop database databasename Import Database: mysql -u username -p password databasename < /importfilePath Import Database: mysqldump -u username -p password databasename > /exportfilePath List all Databases: show databases; Select Database: use databasename; List Tables of a

Linux Cheatsheet

Creating symbolic link ln -s [sourcepath] [destination] example: ls -s /tmp/webportal /var/www/mysite To search for a particular package by name or description apt-cache search package- example: apt-cache search php5- Insalling module in Ubuntu sudo apt-get install nameofthemodule Watch Process Show all the running processes within your Linux environment using following one of these top watch -n 1 "ps u -C processname1,processname2,processname3" example: watch

Windows Cheatsheet

Creating Symbolic link: Step 1: Open command prompt Step 2:¬†mklink /d SymbolicLinkPath TargetPath example: mklink /d C:\testfolder\SymbolicLink d:\testfolder\folderorfiletobelinked   Networking related commands: Find Your IP Address: Step 1: Open command prompt Step 2: ipconfig DNS can be flushed using following command: Step 1: Open command prompt Step 2: iipconfig /flushdns Following might be helpful for checking whether the connectivity between your pc