当前位置: 首页>>代码示例>>PHP>>正文


PHP install函数代码示例

本文整理汇总了PHP中install函数的典型用法代码示例。如果您正苦于以下问题:PHP install函数的具体用法?PHP install怎么用?PHP install使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了install函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: user_install

function user_install()
{
    global $files, $dest_dir;
    foreach ($files['user'] as $user_path) {
        install($user_path, $dest_dir, false);
    }
}
开发者ID:postpostmodern,项目名称:phooey,代码行数:7,代码来源:installer.php

示例2: main

function main()
{
    if ($_SERVER['argc'] > 1) {
        $option = $_SERVER['argv'][1];
    } else {
        help();
    }
    switch ($option) {
        case "install":
            install();
            break;
        case "uninstall":
            uninstall();
            break;
        case "newapp":
            $_SERVER['argc'] != 3 and help();
            newapp($_SERVER['argv'][2]);
            break;
        case "delapp":
            $_SERVER['argc'] != 3 and help();
            delapp($_SERVER['argv'][2]);
            break;
        case "help":
            help();
            break;
        default:
            help();
            break;
    }
}
开发者ID:laiello,项目名称:truelegend,代码行数:30,代码来源:install.php

示例3: apply

 private function apply($file, $type)
 {
     require 'migration/' . $file;
     if ($type == 'remove') {
         remove();
     } else {
         install();
     }
     db()->update_migration->insert(array('id' => $file));
 }
开发者ID:AndreasWebdev,项目名称:ivcms5,代码行数:10,代码来源:migration.php

示例4: apply

 private function apply($file, $type)
 {
     require $this->dir . $file;
     if ($type == 'remove') {
         remove($this->db);
     } else {
         install($this->db);
     }
     $this->checkTable();
     $this->db->migration->insert(array('id' => $file));
 }
开发者ID:masteriv,项目名称:framework,代码行数:11,代码来源:Migration.php

示例5: plugin_consumables_install

function plugin_consumables_install()
{
    global $DB;
    include_once GLPI_ROOT . "/plugins/consumables/inc/profile.class.php";
    if (!TableExists("glpi_plugin_consumables_requests")) {
        include GLPI_ROOT . "/plugins/consumables/install/install.php";
        install();
    }
    PluginConsumablesProfile::initProfile();
    PluginConsumablesProfile::createFirstAccess($_SESSION['glpiactiveprofile']['id']);
    return true;
}
开发者ID:AircraftRu,项目名称:consumables,代码行数:12,代码来源:hook.php

示例6: bootstrap

function bootstrap()
{
    global $user;
    session_start();
    db_connect();
    install();
    permission_load();
    if (!empty($_SESSION['uid'])) {
        $user = user_load($_SESSION['uid']);
    } else {
        $user->roles = array(1 => 1);
    }
}
开发者ID:artem0793,项目名称:orangutan,代码行数:13,代码来源:common.php

示例7: download_install

function download_install($key)
{
    $GLOBALS["PROGRESS_FILE"] = "/usr/share/artica-postfix/ressources/logs/squid.install.progress";
    $GLOBALS["LOG_FILE"] = "/usr/share/artica-postfix/ressources/logs/web/squid.install.progress.txt";
    $sock = new sockets();
    $ArticaTechNetSquidRepo = unserialize(base64_decode($sock->GET_INFO("ArticaTechNetSquidRepo")));
    $array = $ArticaTechNetSquidRepo[$key];
    $URL = $array["URL"];
    $VERSION = $array["VERSION"];
    $FILESIZE = $array["FILESIZE"];
    $FILENAME = $array["FILENAME"];
    $MD5 = $array["MD5"];
    $tarballs_file = "/usr/share/artica-postfix/ressources/conf/upload/{$FILENAME}";
    echo "Url......................: {$URL}\n";
    echo "Version..................: {$VERSION}\n";
    echo "File size................: {$FILESIZE}\n";
    echo "Filename.................: {$FILENAME}\n";
    echo "MD5......................: {$MD5}\n";
    if ($URL == null) {
        build_progress("{downloading} {$FILENAME} {failed}...", 110);
        die;
    }
    build_progress("{downloading} {$FILENAME} {please_wait}...", 5);
    $curl = new ccurl($URL);
    $curl->WriteProgress = true;
    $curl->ProgressFunction = "download_progress";
    if (!$curl->GetFile($tarballs_file)) {
        build_progress("{downloading} {$FILENAME} {failed}...", 110);
        @unlink($tarballs_file);
        echo $curl->error;
        die;
    }
    build_progress("{checking} {$FILENAME} {please_wait}...", 9);
    $filesize = @filesize($tarballs_file);
    $md5file = md5_file($tarballs_file);
    echo "File size................: {$filesize}\n";
    echo "MD5......................: {$md5file}\n";
    if ($filesize < 50) {
        print_r($curl->CURL_ALL_INFOS);
        echo @file_get_contents($tarballs_file);
    }
    if ($md5file != $MD5) {
        @unlink($tarballs_file);
        echo "Md5 failed, corrupted file...\n";
        build_progress("{checking} {$FILENAME} {failed}...", 110);
        die;
    }
    install($FILENAME);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:49,代码来源:exec.squid.uncompress.php

示例8: main

function main(array $args = array())
{
    $defaults = array('install-dir' => getcwd());
    $args += $defaults;
    if (!createFolders($args['install-dir'])) {
        return 1;
    }
    if (!download($args['install-dir'])) {
        return 1;
    }
    if (!install($args['install-dir'])) {
        return 1;
    }
    return 0;
}
开发者ID:hoborglabs,项目名称:dashboard,代码行数:15,代码来源:install.php

示例9: run

function run()
{
    if (!extension_loaded('snmp')) {
        install();
        exit;
    }
    if (!class_exists("SNMP")) {
        exit;
    }
    $session = new SNMP(SNMP::VERSION_1, "127.0.0.1:3401", "public");
    $session->valueretrieval = SNMP_VALUE_PLAIN;
    $ifDescr = $session->walk(".1.3.6.1.4.1.3495", TRUE);
    // $session->valueretrieval = SNMP_VALUE_LIBRARY;
    // $ifType = $session->walk(".1.3.6.1.4.1.3495.1.3", TRUE);
    // 2.2.1.10.5
    print_r($ifDescr);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:17,代码来源:exec.snmp.install.php

示例10: run

function run()
{
    if (!extension_loaded('snmp')) {
        install();
        exit;
    }
    if (!class_exists("SNMP")) {
        exit;
    }
    $session = new SNMP(SNMP::VERSION_1, "127.0.0.1:3401", "public");
    $session->valueretrieval = SNMP_VALUE_PLAIN;
    $ifDescr = $session->walk(".1.3.6.1.4.1.3495.1.3", TRUE);
    $session->valueretrieval = SNMP_VALUE_LIBRARY;
    $ifType = $session->walk(".1.3.6.1.4.1.3495.1.3", TRUE);
    // 2.2.1.10.5
    print_r($ifType);
    $result = array();
    foreach ($ifDescr as $i => $n) {
        $result[$n] = $ifType[$i];
    }
    print_r($result);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:22,代码来源:exec.squid.snmp.php

示例11: process

function process($argv)
{
    if (!isset($argv[1])) {
        displayHelp();
        exit;
    }
    switch ($argv[1]) {
        case 'install':
            install();
            break;
        case 'add':
            add($argv);
            break;
        case 'rm':
            remove($argv);
            break;
        case 'help':
        default:
            displayHelp();
            break;
    }
}
开发者ID:chenyongze,项目名称:m3d,代码行数:22,代码来源:m3d.php

示例12: array_diff

    $customModules = array_diff($allModules, $sysModules);
    $customModulesParams = initModuleParameters($customModules);
    include 'moduleCustom.php';
} elseif ($option == 'installing') {
    // 开始安装模块与数据库,注:模块安装有顺序要求,不然插入数据可能会报错
    if (isset($_GET['installBegin']) && $_GET['installBegin'] == 1) {
        // 异步开始安装
        $installModules = $_POST['installModules'];
        // 要安装的模块
        $installModules = json_decode($installModules);
        $installingModule = $_POST['installingModule'];
        if (empty($installingModule)) {
            $installingModule = $installModules[0];
        }
        $moduleNums = count($installModules);
        $isSuccess = install($installingModule);
        // 执行安装模块
        if ($isSuccess) {
            foreach ($installModules as $k => $module) {
                if ($module == $installingModule) {
                    $index = $k + 1;
                    if ($index < count($installModules)) {
                        $nextModule = $installModules[$index];
                        // 下一个要安装的模块
                        $nextModuleName = getModuleName($nextModule);
                        // 下一个要安装的模块名
                        $process = number_format($index / $moduleNums * 100, 1) . '%';
                        // 完成度
                        echo json_encode(array('complete' => 0, 'isSuccess' => 1, 'process' => $process, 'nextModule' => $nextModule, 'nextModuleName' => $nextModuleName));
                    } else {
                        echo json_encode(array('complete' => 1, 'process' => '100%'));
开发者ID:AxelPanda,项目名称:ibos,代码行数:31,代码来源:index.php

示例13: center

/**
 * center
 *
 * @since 1.2.1
 * @deprecated 2.0.0
 *
 * @package Redaxscript
 * @category Install
 * @author Henry Ruhs
 */
function center()
{
    /* check token */
    if ($_POST && $_POST['token'] != TOKEN) {
        $output = '<div class="box_note note_error">' . l('token_incorrect') . l('point') . '</div>';
        echo $output;
        return;
    }
    /* routing */
    install_notification();
    if (check_install() == 1) {
        install();
    } else {
        install_form();
    }
}
开发者ID:EtienneBruines,项目名称:redaxscript,代码行数:26,代码来源:install.php

示例14: array

{
    $dirs = array(DIR_OPENCART . 'image/', DIR_OPENCART . 'system/storage/download/', DIR_OPENCART . 'system/storage/upload/', DIR_OPENCART . 'system/storage/cache/', DIR_OPENCART . 'system/storage/logs/', DIR_OPENCART . 'system/storage/modification/');
    exec('chmod o+w -R ' . implode(' ', $dirs));
}
$argv = $_SERVER['argv'];
$script = array_shift($argv);
$subcommand = array_shift($argv);
switch ($subcommand) {
    case "install":
        try {
            $options = get_options($argv);
            define('HTTP_OPENCART', $options['http_server']);
            $valid = valid($options);
            if (!$valid[0]) {
                echo "FAILED! Following inputs were missing or invalid: ";
                echo implode(', ', $valid[1]) . "\n\n";
                exit(1);
            }
            install($options);
            echo "SUCCESS! Opencart successfully installed on your server\n";
            echo "Store link: " . $options['http_server'] . "\n";
            echo "Admin link: " . $options['http_server'] . "admin/\n\n";
        } catch (ErrorException $e) {
            echo 'FAILED!: ' . $e->getMessage() . "\n";
            exit(1);
        }
        break;
    case "usage":
    default:
        echo usage();
}
开发者ID:web3d,项目名称:mincart,代码行数:31,代码来源:cli_install.php

示例15: checkPOST

function checkPOST($args)
{
    global $Language;
    // Check empty password
    if (strlen($args['password']) < 6) {
        return '<div>' . $Language->g('Password must be at least 6 characters long') . '</div>';
    }
    // Check invalid email
    if (!Valid::email($args['email']) && $args['noCheckEmail'] == '0') {
        return '<div>' . $Language->g('Your email address is invalid') . '</div><div id="jscompleteEmail">' . $Language->g('Proceed anyway') . '</div>';
    }
    // Sanitize email
    $email = sanitize::email($args['email']);
    // Install Bludit
    install($args['password'], $email, $args['timezone']);
    return true;
}
开发者ID:kaaleth,项目名称:bludit,代码行数:17,代码来源:install.php


注:本文中的install函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。