web/install/start-install.php

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php

date_default_timezone_set('Asia/Shanghai');
// 尚存在问题:
// 1.vendor不存在导致升级检测失败报错
// 2.topxia:build命令没有打包新的api目录,打包6.5.5时需要修改该命令
// 3.执行打包命令需要在项目根目录下存在installFiles文件夹
// 4.如果遇到要打版本不同的问题,检查
// web/install/edusoho_init.sql中的cloud_app数据的版本,
// systeminfo,
// app/config/config.yml,
// CHANGELOG各自的版本
// 5.包太大可能导致上传脚本失败
// 6.打包代码都在feature/install-data

require __DIR__.'/../../bootstrap/bootstrap_install.php';

$loader = new Twig_Loader_Filesystem(__DIR__.'/templates');
$twig = new Twig_Environment($loader, array(
    'cache' => false,
));

$twig->addGlobal('edusoho_version', \AppBundle\System::VERSION);

$step = intval(empty($_GET['step']) ? 0 : $_GET['step']);
$init_data = 1; //写入演示数据
$functionName = 'install_step'.$step;

$functionName($init_data);

use Symfony\Component\Filesystem\Filesystem;
use Topxia\Service\Common\ServiceKernel;
use Biz\Crontab\SystemCrontabInitializer;

function check_installed()
{
    if (array_key_exists('nokey', $_GET)) {
        setcookie('nokey', 1);
        $_COOKIE['nokey'] = 1;
    }

    if (file_exists(__DIR__.'/../../app/data/install.lock')) {
        exit('already install.');
    }
}

function install_step0($init_data = 0)
{
    check_installed();

    global $twig;
    echo $twig->render('step-0.html.twig', array('step' => 0));
}

function install_step1($init_data = 0)
{
    check_installed();
    global $twig;

    $pass = true;

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。