當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Install::makeConfig方法代碼示例

本文整理匯總了PHP中Install::makeConfig方法的典型用法代碼示例。如果您正苦於以下問題:PHP Install::makeConfig方法的具體用法?PHP Install::makeConfig怎麽用?PHP Install::makeConfig使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Install的用法示例。


在下文中一共展示了Install::makeConfig方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: array

     }
     break;
 case '2':
     $vars = array('sitename' => isset($_POST) ? $_POST['sitename'] : "", 'siteslogan' => isset($_POST) ? $_POST['siteslogan'] : "", 'sitedomain' => isset($_POST) ? $_POST['sitedomain'] : "", 'siteurl' => isset($_POST) ? $_POST['siteurl'] : "");
     Session::set_session($vars);
     Theme::install('step2');
     break;
 case '3':
     $vars = array('adminname' => isset($_POST) ? $_POST['adminname'] : "", 'adminuser' => isset($_POST) ? $_POST['adminuser'] : "", 'adminpass' => isset($_POST) ? $_POST['adminpass'] : "");
     Session::set_session($vars);
     Theme::install('step3');
     break;
 case '4':
     try {
         $file = GX_PATH . "/inc/config/config.php";
         $config = Install::makeConfig($file);
         if (System::existConf()) {
             Install::createTable();
             Install::insertData();
             $vars = array('user' => array('userid' => Session::val('adminuser'), 'pass' => User::randpass(Session::val('adminpass')), 'email' => 'admin@' . Session::val('sitedomain'), 'group' => '0', 'join_date' => date("Y-m-d H:i:s"), 'status' => '1'), 'detail' => array('userid' => Session::val('adminuser'), 'fname' => Session::val('adminname')));
             User::create($vars);
             echo "Installation Success. Go to <a href=\"gxadmin\">Admin Page</a>.";
         } else {
             echo "<h2>Error !! Config File Not Found.</h2>\n                Please make sure you had permission to write on the config directory. \n                Do ftp to the server and CHMOD 777 the config directory. After \n                config file is created, you can chmod it back to 755.\n                <br>\n                <br>\n                After You had set the permission, please refresh this page. \n                <br>\n                <br>\n                or <a href=\"?step=4\" class=\"btn btn-primary\">Click Here</a>";
         }
     } catch (exception $e) {
         echo $e->getMessage();
     }
     break;
 default:
     if (System::existConf()) {
開發者ID:vdanelia,項目名稱:GeniXCMS,代碼行數:31,代碼來源:default.control.php


注:本文中的Install::makeConfig方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。