Magento1.x version we can use this
For Phtml File

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('block_identifier')->toHtml(); ?>

Use Phtml In static block

{{block type=”core/template” template=”test/test.phtml”}}

Magento2.x
For Phtml Files similar to Magento 1

<?php echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('block_identifier')->toHtml();?>

Use Phtml In static block

{{block class=”Magento\\Cms\\Block\\Block” block_id=”block_identifier”}}

Magento 2 has one command-line interface that performs both installation and configuration tasks. Console component is one of the new features in Magento 2. Find various command here.

Debug
There are three mode default, developer, production.
To check the current mode:

1
php bin/magento deploy:mode:show

Set new mode

1
php bin/magento deploy:mode:set developer

Deploy
The static view files deployment command enables you to write static files to the Magento file system.

1
php bin/magento setup:static-content:deploy

For specific theme

1
php bin/magento setup:static-content:deploy --theme Magento/backend  --theme yourthemename/default

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$storeManager = $objectManager->get('Magento\Store\Model\StoreManagerInterface');
$currentStore = $storeManager->getStore();
$resource = $objectManager->get('Magento\Framework\App\ResourceConnection');
$connection = $resource->getConnection();
$tableName = $resource->getTableName('my_table'); // the table name in this example is 'my_table'
$sql1 = "SELECT * FROM " . $tableName;
$result1 = $connection->fetchAll($sql1);
echo '<pre>'; print_r($result1); echo '</pre>'