mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
parent
d3fdd2c911
commit
410981296c
3 changed files with 11 additions and 2 deletions
|
@ -24,6 +24,7 @@
|
|||
if (!defined('DS')) {
|
||||
define('DS', DIRECTORY_SEPARATOR);
|
||||
}
|
||||
|
||||
/**
|
||||
* These defines should only be edited if you have cake installed in
|
||||
* a directory layout other than the way it is distributed.
|
||||
|
@ -72,6 +73,9 @@ if (!defined('WWW_ROOT')) {
|
|||
|
||||
// for built-in server
|
||||
if (php_sapi_name() == 'cli-server') {
|
||||
if ($_SERVER['REQUEST_URI'] !== '/' && file_exists(WWW_ROOT . $_SERVER['REQUEST_URI'])) {
|
||||
return false;
|
||||
}
|
||||
$_SERVER['PHP_SELF'] = '/' . basename(__FILE__);
|
||||
}
|
||||
|
||||
|
@ -93,5 +97,6 @@ if (!empty($failed)) {
|
|||
|
||||
App::uses('Dispatcher', 'Routing');
|
||||
|
||||
|
||||
$Dispatcher = new Dispatcher();
|
||||
$Dispatcher->dispatch(new CakeRequest(), new CakeResponse());
|
||||
|
|
|
@ -125,10 +125,11 @@ class ServerShell extends AppShell {
|
|||
return;
|
||||
}
|
||||
|
||||
$command = sprintf("php -S %s:%d -t %s",
|
||||
$command = sprintf("php -S %s:%d -t %s %s",
|
||||
$this->_host,
|
||||
$this->_port,
|
||||
$this->_documentRoot
|
||||
$this->_documentRoot,
|
||||
WEBROOT_DIR . '/index.php'
|
||||
);
|
||||
|
||||
$port = ($this->_port == self::DEFAULT_PORT) ? '' : ':' . $this->_port;
|
||||
|
|
|
@ -74,6 +74,9 @@ if (!defined('WWW_ROOT')) {
|
|||
|
||||
// for built-in server
|
||||
if (php_sapi_name() == 'cli-server') {
|
||||
if ($_SERVER['REQUEST_URI'] !== '/' && file_exists(WWW_ROOT . $_SERVER['REQUEST_URI'])) {
|
||||
return false;
|
||||
}
|
||||
$_SERVER['PHP_SELF'] = '/' . basename(__FILE__);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue