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


PHP dir::functions方法代碼示例

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


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

示例1: create

 public function create($array)
 {
     $id = $this->id;
     $SSH = rp::get('SSH');
     $host = $SSH['ip'];
     $user = $SSH['user'];
     $pass = $SSH['password'];
     unset($SSH);
     $sftp = new sftp($host, $user, $pass);
     $sftp->makedir((string) $id);
     $sftp->chdir((string) $id);
     $control = games::replaceControl($this->sql->get('gameID'), $array);
     $this->createControl($control);
     $dir = dir::backup("control/{$id}/");
     $sftp->put('control.sh', $dir . 'control.sh', NET_SFTP_LOCAL_FILE);
     $sftp->chmod(0777, 'control.sh');
     $sftp->makedir("functions");
     $sftp->chdir("functions");
     $functions = ['fn_install', 'fn_install_complete', 'fn_install_config'];
     foreach ($functions as $file) {
         $path = dir::functions('control/' . $file);
         $sftp->put($file, $path, NET_SFTP_LOCAL_FILE);
         $sftp->chmod(0777, $file);
     }
     return true;
 }
開發者ID:kyroskoh,項目名稱:rokket,代碼行數:26,代碼來源:server.php

示例2: dyn

include dir::classes('autoload.php');
autoload::register();
autoload::addDir(dir::classes('utils'));
new dyn();
if (dyn::get('setup') == true) {
    header('Location: install/');
    exit;
}
if (isset($DYN['backend'])) {
    dyn::add('backend', $DYN['backend']);
} else {
    dyn::add('backend', true);
}
unset($DYN);
include dir::functions('html_stuff.php');
include dir::functions('url_stuff.php');
lang::setDefault();
lang::setLang(dyn::get('lang'));
$DB = dyn::get('DB');
sql::connect($DB['host'], $DB['user'], $DB['password'], $DB['database']);
ob_start();
date_default_timezone_set(dyn::get('timezone', 'Europe/Berlin'));
new userLogin();
dyn::add('user', new user(userLogin::getUser()));
cache::setCache(dyn::get('cache'));
addonConfig::loadAllConfig();
addonConfig::includeAllLangFiles();
addonConfig::includeAllLibs();
if (dyn::get('backend')) {
    include dir::backend('backend.php');
} else {
開發者ID:pasterntt,項目名稱:dynao-CMS,代碼行數:31,代碼來源:index.php

示例3: set_include_path

set_include_path(get_include_path() . PATH_SEPARATOR . 'lib/vendor/phpseclib');
include_once 'Net/SSH2.php';
include_once 'Net/SFTP.php';
define('NET_SSH2_LOGGING', NET_SSH2_LOG_COMPLEX);
include 'lib/classes/dir.php';
new dir();
include dir::classes('autoload.php');
autoload::register();
autoload::addDir(dir::classes('helper'));
new rp();
if (rp::get('setup') == true) {
    header('Location: install/');
    exit;
}
include dir::functions('html.php');
include dir::functions('convert.php');
lang::setDefault();
lang::setLang(rp::get('lang'));
$DB = rp::get('DB');
sql::connect($DB['host'], $DB['user'], $DB['password'], $DB['database']);
unset($DB);
date_default_timezone_set(rp::get('timezone', 'Europe/Berlin'));
new userLogin();
rp::add('user', new user(userLogin::getUser()));
cache::setCache(rp::get('cache'));
addonConfig::loadAllConfig();
addonConfig::includeAllLangFiles();
addonConfig::includeAllLibs();
$page = type::super('page', 'string', 'dashboard');
$action = type::super('action', 'string');
$id = type::super('id', 'int');
開發者ID:kyroskoh,項目名稱:rokket,代碼行數:31,代碼來源:index.php


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