Manage cache in magento 2

For cache management in Magento 2, login to Magento 2 server. Change your directory to <Magento 2 install directory>/bin. Type the below command to know the status of the cache php magento cache:status You will get result list. You woul ...

Read More

Add block class in cms page in magento 2

In Magento, often we need to add blocks in cms page, for example home page we need feature products, new products etc. So this post is about how we can add static in cms page. There is small code that we need to add in our cms page. As in example, ...

Read More

Setup cron jobs in magento 2

In Magento 2, for cron setup login to your magento 2 server. Change your directory to <Magento 2 install directory>/bin . Now run the following command. php magento cron:run The above command will set crons for reindexes indexers, sen ...

Read More

Manage indexers in magento 2

For managing indexers in magento 2 through cli, you need to login your server. Make sure you have write file permissions.Now change your directory to <Magento insall dir>/bin. For example your magento 2 is installed in /var/www/html then you n ...

Read More

Php Interview Questions And Answers

What is php ? PHP stands for Hypertext Preprocessor. Its old full form was Personal Home Page. Php is an open source, server side scripting language, primarily used for web development. Php code could be executed with command line (CLI). How vari ...

Read More

Sql Select Distinct

There may be duplicate values in column of table.But we may want to only distinct values from that column. This kind of requirement is fulfilled by DISTINCT. Syntax is as: SELECT DISTINCT(column_name) FROM table_name ...

Read More

Php validation class

Client side validation is done with javascript , but for robust application we should perform sever side validation as well. It makes php application more secure and reliable. Here a php validation class is given with static methods. You can include ...

Read More

php class for mysql database manipulation

Here, this is a php class for manipulating mysql database and executing queries. For beginners this very useful. Include this file in your project and call this class by creating object. Here is class : <?php class Db { protected ...

Read More

Php random string or number tutorial

There are some occasions, when we need a random string. For example when we want to generate password or we want to send verification code or captcha code etc. For generating random string with php, we shall make a function getRandom(), you may use a ...

Read More

Difference between two dates in php

For calculating difference between two dates in php we are make two functions, getDiff and its helping function daysInMonth,getDiff returns difference in array and daysInMonth returns days in month of given year and they are as follow: <?php ...

Read More