一、详细介绍
部署环境:Nginx≥1.18 PHP=7.2 MySQL= 5.6(必须按照这个环境来,否则无法正常使用)
搭建此网站需要3个域名 (一个作为后台域名,一个作为中转域名,一个作为分站域名,添加到同一个站点里面)
知识点:不需要购买3个域名,同一个域名可以无限解析二级域名(当然3个域名都不一样会更好,避免域名红了全部一起红)
1、添加站点,将文件上传到网站根目录并解压
2、伪静态选ThinkPHP
3、导入数据库:付费进群系统5.2版数据库.sql
4、修改config/database.php(数据库名、用户名、密码)
5、修改域名config/extra/ip.php(填后台域名)
6、安装PHP扩展:swoole
7、将swoole_loader_72_nts.so文件,放入/www/server/php/72/lib/php/extensions/no-debug-non-zts-20170718目录中
8、将/www/server/php/72/etc/目录中的php.ini文件删除,然后上传源码包里面的php.ini文件
9、第6-8步骤全部完成后,请重启一下PHP
10、至此,教程结束,打开后台域名即可访问网站总后台
二、效果展示
1.部分代码
代码如下(示例):
public static function markTime($markerId)
{
list($usec, $sec) = explode(" ", microtime());
$time = ((float)$usec + (float)$sec);
if (!isset($GLOBALS['qr_time_bench']))
$GLOBALS['qr_time_bench'] = array();
$GLOBALS['qr_time_bench'][$markerId] = $time;
}
//----------------------------------------------------------------------
public static function timeBenchmark()
{
self::markTime('finish');
$lastTime = 0;
$startTime = 0;
$p = 0;
echo '<table cellpadding="3" cellspacing="1">
<thead><tr style="border-bottom:1px solid silver"><td colspan="2" style="text-align:center">BENCHMARK</td></tr></thead>
<tbody>';
foreach($GLOBALS['qr_time_bench'] as $markerId=>$thisTime) {
if ($p > 0) {
echo '<tr><th style="text-align:right">till '.$markerId.': </th><td>'.number_format($thisTime-$lastTime, 6).'s</td></tr>';
} else {
$startTime = $thisTime;
}
$p++;
$lastTime = $thisTime;
}
echo '</tbody><tfoot>
<tr style="border-top:2px solid black"><th style="text-align:right">TOTAL: </th><td>'.number_format($lastTime-$startTime, 6).'s</td></tr>
</tfoot>
</table>';
}
2.效果图展示


4555

被折叠的 条评论
为什么被折叠?



