Слияние кода завершено, страница обновится автоматически
<?php
declare(strict_types=1);
/**
* This file is part of Coole.
*
* @link https://github.com/guanguans/coole
* @contact guanguans <ityaozm@gmail.com>
* @license https://github.com/guanguans/coole/blob/main/LICENSE
*/
/**
* This file is part of Coole.
*
* @see https://github.com/guanguans/coole
*
* @contact guanguans <ityaozm@gmail.com>
*
* @license https://github.com/guanguans/coole/blob/main/LICENSE
*/
class LocalValetDriver extends BasicValetDriver
{
/**
* Determine if the driver serves the request.
*
* @param string $sitePath
* @param string $siteName
* @param string $uri
*
* @return bool
*/
public function serves($sitePath, $siteName, $uri)
{
return file_exists($sitePath.'/bin/cooler') && $this->asRootPhpIndexFile($sitePath);
}
/**
* Determine if the incoming request is for a static file.
*
* @param string $sitePath
* @param string $siteName
* @param string $uri
*
* @return string|false
*/
public function isStaticFile($sitePath, $siteName, $uri)
{
if ($this->isActualFile($staticFilePath = $this->asActualFile($sitePath, $uri))) {
return $staticFilePath;
}
return false;
}
/**
* Get the fully resolved path to the application's front controller.
*
* @param string $sitePath
* @param string $siteName
* @param string $uri
*
* @return string
*/
public function frontControllerPath($sitePath, $siteName, $uri)
{
$_SERVER['DOCUMENT_ROOT'] = $sitePath;
$_SERVER['SERVER_NAME'] = $_SERVER['HTTP_HOST'];
$_SERVER['SCRIPT_NAME'] = $_SERVER['PHP_SELF'] = '/index.php';
$_SERVER['SCRIPT_FILENAME'] = $this->asRootPhpIndexFile($sitePath);
return $_SERVER['SCRIPT_FILENAME'];
}
}
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )