<?php
$phpVersion = phpversion();
if (version_compare($phpVersion, '7.0.0', '<'))
{
die("PHP 7.0.0 or newer is required. $phpVersion does not meet this requirement. Please ask your host to upgrade PHP.");
}
$dir = __DIR__;
// works perfect here
if (file_exists($dir . '/blockscript/detector.php'))
{
include_once($dir . '/blockscript/detector.php');
}
//^^ works perfect here
require($dir . '/src/XF.php');
XF::start($dir);
if (\XF::requestUrlMatchesApi())
{
\XF::runApp('XF\Api\App');
}
else
{
\XF::runApp('XF\Pub\App');
}