本文整理汇总了PHP中install函数的典型用法代码示例。如果您正苦于以下问题:PHP install函数的具体用法?PHP install怎么用?PHP install使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了install函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: ini_set
<?php
/**
* Copyright Zikula Foundation 2009 - Zikula Application Framework
*
* This work is contributed to the Zikula Foundation under one or more
* Contributor Agreements and licensed to You under the following license:
*
* @license GNU/LGPLv3 (or at your option, any later version).
* @package Installer
*
* Please see the NOTICE file distributed with this source code for further
* information regarding copyright and licensing.
*/
ini_set('max_execution_time', 86400);
ini_set('memory_limit', '64M');
include 'lib/bootstrap.php';
include 'install/lib.php';
install($core);
开发者ID:projectesIF,项目名称:Sirius,代码行数:19,代码来源:install.php
示例17: exit
exit(0);
}
if (defined('APP_INC_PATH')) {
set_include_path(APP_INC_PATH . PATH_SEPARATOR . get_include_path());
}
require_once APP_PATH . '/autoload.php';
list($warnings, $errors) = checkRequirements();
if ($warnings || $errors) {
Misc::displayRequirementErrors(array_merge($errors, $warnings), 'Eventum Setup');
if ($errors) {
exit(1);
}
}
$tpl = new Template_Helper();
if (@$_POST['cat'] == 'install') {
$res = install();
$tpl->assign('result', $res);
// check for the optional IMAP extension
$tpl->assign('is_imap_enabled', function_exists('imap_open'));
}
$full_url = dirname($_SERVER['PHP_SELF']);
$pieces = explode('/', $full_url);
$relative_url = array();
$relative_url[] = '';
foreach ($pieces as $piece) {
if (!empty($piece) && $piece != 'setup') {
$relative_url[] = $piece;
}
}
$relative_url[] = '';
$relative_url = implode('/', $relative_url);
开发者ID:dabielkabuto,项目名称:eventum,代码行数:31,代码来源:index.php
示例18: mkdir
mkdir($_CONFIG['images'], 0705);
chmod($_CONFIG['images'], 0705);
}
if (!is_file($_CONFIG['images'] . '/.htaccess')) {
file_put_contents($_CONFIG['images'] . '/.htaccess', 'options -indexes');
}
if (!is_file($_CONFIG['ban'])) {
file_put_contents($_CONFIG['ban'], '<?php' . PHP_EOL . '$_CONFIG[\'ban_ip\']=' . var_export(array('failures' => array(), 'banned' => array()), TRUE) . ';' . PHP_EOL . '?>');
}
//ob_start();
$tpl = new RainTPL();
if (!is_file($_CONFIG['settings'])) {
define('TITLE', $_CONFIG['title']);
define('ROBOTS', $_CONFIG['robots']);
define('AUTHOR', 'Nicolas Devenet');
install($tpl);
}
require $_CONFIG['settings'];
define('TITLE', $_CONFIG['title']);
define('PAGINATION', $_CONFIG['pagination']);
define('ROBOTS', $_CONFIG['robots']);
define('AUTHOR', empty($_CONFIG['author']) ? $_CONFIG['login'] : $_CONFIG['author']);
define('BASE_LANG', $_CONFIG['locale']);
define('BASE_URL', (empty($_SERVER['REQUEST_SCHEME']) ? 'http' : $_SERVER['REQUEST_SCHEME']) . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']) . '/');
$tpl->assign('MyBooksVersion', preg_replace('#(\\d+\\.\\d+)(\\.\\d+)#', '$1', MYBOOKS_VERSION));
/**
* Rain class
* @version 2.7.2
*/
class RainTPL
{
开发者ID:Devenet,项目名称:MyBooks,代码行数:31,代码来源:index.php
示例19: dirname
}
include_once dirname(__FILE__) . '/ressources/class.templates.inc';
include_once dirname(__FILE__) . '/ressources/class.ldap.inc';
include_once dirname(__FILE__) . '/ressources/class.computers.inc';
include_once dirname(__FILE__) . '/ressources/class.system.network.inc';
include_once dirname(__FILE__) . '/ressources/class.ccurl.inc';
include_once dirname(__FILE__) . "/framework/class.unix.inc";
include_once dirname(__FILE__) . "/framework/frame.class.inc";
if (preg_match("#--verbose#", implode(" ", $argv))) {
$GLOBALS["VERBOSE"] = true;
ini_set('display_errors', 1);
ini_set('error_reporting', E_ALL);
ini_set('error_prepend_string', null);
ini_set('error_append_string', null);
}
install($argv[1]);
exit;
function ArticaMeta_release($source_package)
{
$sock = new sockets();
$EnableArticaMetaServer = intval($sock->GET_INFO("EnableArticaMetaServer"));
if ($EnableArticaMetaServer == 0) {
echo "Starting......: " . date("H:i:s") . " Checking Artica-meta repository - DISABLED -\n";
return;
}
echo "Starting......: " . date("H:i:s") . " Checking META repository - ENABLED -\n";
$ArticaMetaStorage = $sock->GET_INFO("ArticaMetaStorage");
if ($ArticaMetaStorage == null) {
$ArticaMetaStorage = "/home/artica-meta";
}
@mkdir("{$ArticaMetaStorage}/nightlys", 0755, true);
开发者ID:articatech,项目名称:artica,代码行数:31,代码来源:exec.artica.update.manu.php
示例20: fclose
}
if (fwrite($file, $data) === false) {
break;
}
}
fclose($file);
fclose($fileData);
///////
$path = PATH_TRUNK;
//$path = PATH_OUTTRUNK;
if (EnterpriseUtils::checkFolderPermissions($path, true) == false) {
$str = $path . " " . "directory, its sub-directories or file is not writable. Read the wiki for <a href=\"http://wiki.processmaker.com/index.php/Upgrading_ProcessMaker\" onclick=\"window.open(this.href, \\'_blank\\'); return (false);\">Upgrading ProcessMaker</a>.<br /> The file is downloaded in " . $fileName . "<br />";
throw new Exception($str);
}
///////
$result = install($fileName);
if ($result["status"] == "OK") {
$response["status"] = $result["status"];
//OK
$response["message"] = $result["message"];
G::auditLog("InstallPlugin", "Plugin Name: " . $file);
} else {
throw new Exception($result["message"]);
}
} catch (Exception $e) {
$response["message"] = $e->getMessage();
$status = 0;
}
if ($status == 0) {
$response["status"] = "ERROR";
}
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:processMakerAjax.php
注:本文中的install函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论