Skip to content

Commit f35639b

Browse files
committed
v3.3.0
1 parent 8b65a97 commit f35639b

4 files changed

Lines changed: 15 additions & 8 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ FodyWeavers.xsd
404404

405405
# aseqbase
406406
~*
407-
\.*
407+
.htaccess
408408
/private
409409
/public
410410
/test

composer.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,13 @@
2121
],
2222
"minimum-stability": "dev",
2323
"prefer-stable": true,
24-
"scripts": {
25-
"start": "php -S localhost:8000 & net start MySQL & php index.php"
24+
"scripts": {
25+
"start": [
26+
"Composer\\Config::disableProcessTimeout",
27+
"php -S localhost:8000",
28+
"net start MySQL",
29+
"php index.php"
30+
]
2631
},
2732
"autoload": {
2833
"psr-4": {

initialize.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@
55
if(!isset($GLOBALS["HOST"])){
66
$GLOBALS["HOST"] = (isset($_SERVER['HTTPS'])?"https://":"http://");
77
if($NEST > 0){
8+
$host_parts = [];
89
if(preg_match("/(\d+\.)+$/",$_SERVER["HTTP_HOST"]))
910
$host_parts = explode(".", strtolower(trim($_SERVER["HTTP_HOST"])));
10-
elseif(preg_match("/localhost$/", $_SERVER["HTTP_HOST"]))
11-
$host_parts = [...explode(".", strtolower(trim($_SERVER["HTTP_HOST"]))), ""];
11+
elseif(preg_match("/localhost(:\d{,6})?$/", $_SERVER["HTTP_HOST"]))
12+
$host_parts = [strtolower(trim($_SERVER["HTTP_HOST"])), ""];
1213
else $host_parts = explode(".", strtolower(trim($_SERVER["HTTP_HOST"])));
1314
$hpc = count($host_parts);
1415
$GLOBALS["HOST"] .= $host_parts[$hpc-(1+$NEST)];
1516
for ($i = $NEST; $i > 0; $i--) $GLOBALS["HOST"] .= ".".$host_parts[$hpc-$i];
17+
$GLOBALS["HOST"] = trim($GLOBALS["HOST"], ".");
1618
}
1719
else $GLOBALS["HOST"] .= strtolower(trim($_SERVER["HTTP_HOST"]));
1820
}

router.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?php
22
// To unset the default router sat at the bottom layers
3-
\_::$Back->Router->Route->Reset();
3+
\_::$Back->Router->On()->Reset();
44

55
/**
66
* Use your routers by below formats
7-
* \_::$Back->Router->Route("A Part Of Path?")->Default("Route Name");
7+
* \_::$Back->Router->On("A Part Of Path?")->Default("Route Name");
88
*/
99

1010
// To route other requests to the DefaultRouteName
11-
\_::$Back->Router->Route->Default(\_::$Config->DefaultRouteName);
11+
\_::$Back->Router->On()->Default(\_::$Config->DefaultRouteName);
1212
?>

0 commit comments

Comments
 (0)