Automatic redirection when accessing index.php not from cli.

This commit is contained in:
Krzysztof Płaczek
2024-05-08 08:28:43 +02:00
parent d2abfba355
commit b9ba72c308

View File

@@ -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;
} }