-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcacheflush.php
35 lines (30 loc) · 937 Bytes
/
cacheflush.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
/***********
* © SSLCommerz 2017
* Author : SSLCommerz
* Developed by : Prabal Mallick
* Email: [email protected]
***********/
use Magento\Framework\App\Bootstrap;
require __DIR__ . '/app/bootstrap.php';
$bootstrap = Bootstrap::create(BP, $_SERVER);
$obj = $bootstrap->getObjectManager();
$state = $obj->get('Magento\Framework\App\State');
$state->setAreaCode('frontend');
$k[0]='bin/magento';
$k[1]='cache:flush'; // write your proper command like setup:upgrade,cache:enable etc...
$_SERVER['argv']=$k;
try {
$handler = new \Magento\Framework\App\ErrorHandler();
set_error_handler([$handler, 'handler']);
$application = new Magento\Framework\Console\Cli('Magento CLI');
$application->run();
} catch (\Exception $e) {
while ($e) {
echo $e->getMessage();
echo $e->getTraceAsString();
echo "\n\n";
$e = $e->getPrevious();
}
}
?>