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


PHP gcms::install方法代碼示例

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


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

示例1:

<?php

// widgets/marquee/admin_install.php
if (MAIN_INIT == 'installing') {
    // install sql
    gcms::install(ROOT_PATH . 'widgets/marquee/sql.php');
    // บันทึกภาษา
    gcms::saveLanguage();
    $content[] = '<li class=valid>Add <strong>Language</strong> complete.</li>';
}
開發者ID:phannack,項目名稱:GCMS,代碼行數:10,代碼來源:admin_install.php

示例2: array

<?php

// modules/edocument/admin_install.php
if (MAIN_INIT == 'installing') {
    if ($ftp->mkdir(DATA_PATH . 'edocument/', 0755)) {
        $content[] = '<li class=valid>โฟลเดอร์ <strong>' . DATA_FOLDER . 'edocument/</strong> สามารถใช้งานได้</li>';
    } else {
        $content[] = '<li class=invalid>โฟลเดอร์ <strong>' . DATA_FOLDER . 'edocument/</strong> <em>ไม่สามารถเขียนหรือสร้างได้</em> กรุณาสร้างโฟลเดอร์นี้และปรับ chmod ให้เป็น 755 ด้วยตัวเอง</li>';
    }
    // install module
    gcms::installModule('edocument', 'edocument', 'E-Document');
    $content[] = '<li class=valid>ติดตั้งโมดูล <strong>E-Document</strong> เรียบร้อย</li>';
    // install sql
    gcms::install(ROOT_PATH . 'modules/edocument/sql.php');
    // โหลด config ใหม่
    $config = array();
    if (is_file(CONFIG)) {
        include CONFIG;
    }
    // โหลด config ของโมดูล
    include ROOT_PATH . 'modules/edocument/default.config.php';
    $config = array_merge($config, $newconfig['edocument']);
    // save config
    if (gcms::saveconfig(CONFIG, $config)) {
        $content[] = '<li class=valid>Add <strong>configs</strong> complete.</li>';
    } else {
        $content[] = '<li class=invalid>' . sprintf($lng['ERROR_FILE_READ_ONLY'], 'bin/config.php') . '</li>';
    }
    // add vars
    if (sizeof($defines) > 0) {
        if ($ftp->fwrite(ROOT_PATH . 'bin/vars.php', 'ab', "\n\t// Module E-Document\n\t" . implode("\n\t", $defines))) {
開發者ID:phannack,項目名稱:GCMS,代碼行數:31,代碼來源:admin_install.php

示例3: sprintf

<?php

// widgets/tags/admin_install.php
if (MAIN_INIT == 'installing') {
    // install sql
    gcms::install(ROOT_PATH . 'widgets/tags/sql.php');
    if (sizeof($defines) > 0) {
        // add vars
        if ($ftp->fwrite(ROOT_PATH . 'bin/vars.php', 'ab', "\n\t// Widget Tags\n\t" . implode("\n\t", $defines))) {
            $content[] = '<li class=valid>Add <strong>vars</strong> complete.</li>';
        } else {
            $content[] = '<li class=invalid>' . sprintf($lng['ERROR_FILE_READ_ONLY'], 'bin/vars.php') . '</li>';
        }
    }
    // บันทึกภาษา
    gcms::saveLanguage();
    $content[] = '<li class=valid>Add <strong>Language</strong> complete.</li>';
}
開發者ID:phannack,項目名稱:GCMS,代碼行數:18,代碼來源:admin_install.php

示例4: elseif

<?php

if (INSTALL_INIT == 'upgrade') {
    if (version_compare($current_version, '5.0.0') == -1) {
        // upgrade to 5.0.0
        include ROOT_PATH . 'admin/install/500.php';
    } elseif (version_compare($current_version, '5.1.0') == -1) {
        // upgrade to 5.1.0
        $current_version = '5.1.0';
        // install sql 5.1.0
        gcms::install(ROOT_PATH . 'admin/install/510.php');
    } elseif (version_compare($current_version, '5.2.1') == -1) {
        // upgrade to 5.2.1
        include ROOT_PATH . 'admin/install/521.php';
    } elseif (version_compare($current_version, '6.0.0') == -1) {
        // upgrade to 6.0.0
        include ROOT_PATH . 'admin/install/600.php';
    } elseif (version_compare($current_version, '6.0.1') == -1) {
        // upgrade to 6.0.1
        include ROOT_PATH . 'admin/install/601.php';
    } elseif (version_compare($current_version, '7.1.0') == -1) {
        // upgrade to 7.1.0
        include ROOT_PATH . 'admin/install/710.php';
    } elseif (version_compare($current_version, '8.2.0') == -1) {
        // upgrade to 8.2.0
        include ROOT_PATH . 'admin/install/820.php';
    } elseif (version_compare($current_version, '9.0.0') == -1) {
        // upgrade to 9.0.0
        include ROOT_PATH . 'admin/install/900.php';
    } elseif (version_compare($current_version, '9.3.0') == -1) {
        // upgrade to 9.3.0
開發者ID:phannack,項目名稱:GCMS,代碼行數:31,代碼來源:upgrading.php

示例5: array

<?php

// widgets/chat/admin_install.php
if (MAIN_INIT == 'installing') {
    // install sql
    gcms::install(ROOT_PATH . 'widgets/chat/sql.php');
    // โหลด config ใหม่
    $config = array();
    if (is_file(CONFIG)) {
        include CONFIG;
    }
    // โหลด config ของโมดูล
    include ROOT_PATH . 'widgets/chat/default.config.php';
    $config = array_merge($config, $newconfig['chat']);
    // save config
    if (gcms::saveconfig(CONFIG, $config)) {
        $content[] = '<li class=valid>Add <strong>configs</strong> complete.</li>';
    } else {
        $content[] = '<li class=invalid>' . sprintf($lng['ERROR_FILE_READ_ONLY'], 'bin/config.php') . '</li>';
    }
    // add vars
    if (sizeof($defines) > 0) {
        if ($ftp->fwrite(ROOT_PATH . 'bin/vars.php', 'ab', "\n\t// Widget Chat Room\n\t" . implode("\n\t", $defines))) {
            $content[] = '<li class=valid>Add <strong>vars</strong> complete.</li>';
        } else {
            $content[] = '<li class=invalid>' . sprintf($lng['ERROR_FILE_READ_ONLY'], 'bin/vars.php') . '</li>';
        }
    }
    // บันทึกภาษา
    gcms::saveLanguage();
    $content[] = '<li class=valid>Add <strong>Language</strong> complete.</li>';
開發者ID:phannack,項目名稱:GCMS,代碼行數:31,代碼來源:admin_install.php


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