<script src="<?php echo $_G['project']['home']; ?> api.php?action=service&execute=recommend&callback=Serv.Cloud.recommend">/*获取推荐模块*/</script> <script src="<?php echo $_G['project']['home']; ?> api.php?action=service&execute=install&appname=<?php echo $_G['product']['appname']; ?> &version=<?php echo $_G['product']['version']; ?> &domain=<?php echo url_host(); ?> &licence=<?php echo $_G['licence']['type']; ?> &host=<?php echo urlencode(url_fore() . url_base()); ?> ">/*发送安装命令*/</script> <p> <button type="button" onclick="location.replace('./');">立即登入</button> </p> <?php } } }
function url_fore() { //拼接协议 $host = isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on' ? 'https://' : 'http://'; //拼接主机 $host .= url_host(); //拼接端口 $host .= $_SERVER['SERVER_PORT'] != 80 ? ':' . $_SERVER['SERVER_PORT'] : ''; return $host; }