控制器里的方法

public function welcome(){
$info = array(
'操作系统'=>PHP_OS,
'运行环境'=>$_SERVER["SERVER_SOFTWARE"],
'PHP运行方式'=>php_sapi_name(),
'ThinkPHP版本'=>THINK_VERSION.' [ <a href="http://thinkphp.cn" target="_blank">查看最新版本</a> ]',
'上传附件限制'=>ini_get('upload_max_filesize'),
'执行时间限制'=>ini_get('max_execution_time').'秒',
'服务器时间'=>date("Y年n月j日 H:i:s"),
'北京时间'=>gmdate("Y年n月j日 H:i:s",time()+8*3600),
'服务器域名/IP'=>$_SERVER['SERVER_NAME'].' [ '.gethostbyname($_SERVER['SERVER_NAME']).' ]',
'剩余空间'=>round((disk_free_space(".")/(1024*1024)),2).'M',
'register_globals'=>get_cfg_var("register_globals")=="1" ? "ON" : "OFF",
'magic_quotes_gpc'=>(1===get_magic_quotes_gpc())?'YES':'NO',
'magic_quotes_runtime'=>(1===get_magic_quotes_runtime())?'YES':'NO',
);
$this->assign('info',$info);
return $this->fetch
}

视图 view

 {volist name="info" id="v"}
   <tr>
      <th>{$key}</th>
       <td>{$v}</td>
 </tr>             
 {/volist}

tp5欢迎页 (获取系统信息)

相关文章:

  • 2022-03-03
  • 2021-06-24
  • 2021-06-21
  • 2022-01-20
  • 2021-07-16
  • 2021-11-19
猜你喜欢
  • 2021-12-05
  • 2021-12-10
  • 2021-11-22
  • 2021-09-23
  • 2022-02-25
相关资源
相似解决方案