/** * 生产Key */ function install_step999() { if (empty($_COOKIE['nokey'])) { if (empty($_SESSION)) { session_start(); } $connection = _create_connection(); $serviceKernel = ServiceKernel::create('prod', true); $serviceKernel->setParameterBag(new ParameterBag(array('kernel' => array('root_dir' => realpath(__DIR__ . '/../../app'))))); $serviceKernel->setConnection($connection); $init = new SystemInit(); $key = $init->initKey(); echo json_encode($key); } else { echo json_encode(array('accessKey' => '__NOKEY__', 'secretKey' => '__NOKEY__')); } }