Automatic redirection when accessing index.php not from cli.
This commit is contained in:
@@ -7,6 +7,7 @@ use Krzysiej\RyobiCrawler\Models\Price;
|
|||||||
use Krzysiej\RyobiCrawler\Models\Product;
|
use Krzysiej\RyobiCrawler\Models\Product;
|
||||||
|
|
||||||
if (php_sapi_name() !== 'cli') {
|
if (php_sapi_name() !== 'cli') {
|
||||||
|
header('Location: browser.php');
|
||||||
echo 'Execute this script in cli only';
|
echo 'Execute this script in cli only';
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user