Skip to content
This repository was archived by the owner on Jan 23, 2019. It is now read-only.

Commit 85136b6

Browse files
committed
some modify...
1 parent d250ab0 commit 85136b6

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/env/Environment.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111

1212
use inhere\librarys\StdBase;
1313

14+
/**
15+
* 环境信息
16+
* Class Environment
17+
* @package inhere\librarys\env
18+
*/
1419
class Environment extends StdBase
1520
{
1621
/**

src/env/Server.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ public function init()
101101
'isWeb' => PhpHelper::isWeb(),
102102

103103
// operate system
104-
'uname' => PHP_OS,
105-
'os' => strtoupper(substr(PHP_OS, 0, 3)),
104+
'os' => PHP_OS,
105+
'osShort' => strtoupper(substr(PHP_OS, 0, 3)),
106106
'isUnix' => $this->isUnix(),
107107
])->set('isWin', $this->get('os') == 'WIN')
108108
->set('isLinux', $this->get('os') == 'LIN');
@@ -124,7 +124,7 @@ public function getEntry($full = true)
124124
$file = substr($file, strlen($wDir));
125125
}
126126

127-
$file = trim($file, '.' . DIRECTORY_SEPARATOR);
127+
$file = rtrim($file, '.' . DIRECTORY_SEPARATOR);
128128

129129
if ($full && $this->get('isCli') ) {
130130
$file = $wDir . DIRECTORY_SEPARATOR . $file;

0 commit comments

Comments
 (0)