I want to create a custom script for this I have created folder test on root
and two files inside folder index.php , test.php
My index.php Looks like
require DIR . '../../app/bootstrap.php';
require dirname(__FILE__) . '/Test.php';
$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER);
$app = $bootstrap->createApplication('Test');
$bootstrap->run($app);
and Test.php looks like below
class Test extends \Magento\Framework\App\Http implements \Magento\Framework\AppInterface
{
public function launch()
{
echo "launched";
return $this->_response;
}
public function catchException(\Magento\Framework\App\Bootstrap $bootstrap, \Exception $exception)
{
return false;
}
}
But am getting 404 error example.com/test
example.com/test/index.php getting File not found