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


PHP jApp::loadConfig方法代码示例

本文整理汇总了PHP中jApp::loadConfig方法的典型用法代码示例。如果您正苦于以下问题:PHP jApp::loadConfig方法的具体用法?PHP jApp::loadConfig怎么用?PHP jApp::loadConfig使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在jApp的用法示例。


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

示例1: __construct

 /**
  * @param  string|object $config filename of the ini file to configure the framework, or the config object itself
  *              this parameter is optional if jApp::loadConfig has been already called
  * @param  boolean $enableErrorHandler enable the error handler of jelix.
  *                 keep it to true, unless you have something to debug
  *                 and really have to use the default handler or an other handler
  */
 function __construct($configFile = '', $enableErrorHandler = true)
 {
     if ($configFile) {
         jApp::loadConfig($configFile, $enableErrorHandler);
     }
     $this->_loadPlugins();
 }
开发者ID:medali1990,项目名称:medsite,代码行数:14,代码来源:jCoordinator.class.php

示例2: process

 /**
  * action to process the page after the submit
  * @return 0
  */
 function process()
 {
     $errors = array();
     $login = $_SESSION['adminaccount']['login'] = trim($_POST['login']);
     if ($login == '') {
         $errors[] = $this->locales['error.missing.login'];
     }
     $password = $_SESSION['adminaccount']['password'] = trim($_POST['password']);
     if ($password == '') {
         $errors[] = $this->locales['error.missing.password'];
     }
     $passwordconf = $_SESSION['adminaccount']['password_confirm'] = trim($_POST['password_confirm']);
     if ($password != $passwordconf) {
         $errors[] = $this->locales['error.confirm.password'];
     }
     $email = $_SESSION['adminaccount']['email'] = trim($_POST['email']);
     if ($email == '') {
         $errors[] = $this->locales['error.missing.email'];
     }
     if (count($errors)) {
         $_SESSION['adminaccount']['errors'] = $errors;
         return false;
     }
     jApp::loadConfig('havefnubb/config.ini.php');
     $db = jDb::getConnection();
     $db->exec('INSERT INTO ' . $db->encloseName($db->prefixTable('community_users')) . ' (login, password, email, nickname, status, create_date) VALUES (' . $db->quote($login) . ',' . $db->quote(md5($password)) . ',' . $db->quote($email) . ',' . $db->quote($login) . ',1,' . "'" . date('Y-m-d H:i:s') . "')");
     $idu = $db->lastInsertId();
     $db->exec('INSERT INTO ' . $db->encloseName($db->prefixTable('jacl2_group')) . ' (id_aclgrp, name, grouptype, ownerlogin) ' . 'VALUES (' . $db->quote('__priv_' . $login) . ',' . $db->quote($login) . ',2,' . $db->quote($login) . ')');
     $db->exec('INSERT INTO ' . $db->encloseName($db->prefixTable('jacl2_user_group')) . ' (login, id_aclgrp) VALUES (' . $db->quote($login) . ',\'admins\')');
     $db->exec('INSERT INTO ' . $db->encloseName($db->prefixTable('jacl2_user_group')) . ' (login, id_aclgrp) VALUES (' . $db->quote($login) . ',' . $db->quote('__priv_' . $login) . ')');
     unset($_SESSION['adminaccount']);
     return 0;
 }
开发者ID:havefnubb,项目名称:havefnubb,代码行数:37,代码来源:adminaccount.page.php

示例3: checkAppOpened

<?php

/**
* @package   lizmap
* @subpackage admin
* @author    3liz
* @copyright 2011 3liz
* @link      http://3liz.com
* @license    Mozilla Public License : http://www.mozilla.org/MPL/
*/
require '../application.init.php';
require JELIX_LIB_CORE_PATH . 'request/jClassicRequest.class.php';
checkAppOpened();
// Charge la configuration
jApp::loadConfig('admin/config.ini.php');
// nouveau coordinateur, que l'on indique à jApp
jApp::setCoord(new jCoordinator());
// Nouvel objet request, que l'on passe au coordinateur, pour traiter le routage.
jApp::coord()->process(new jClassicRequest());
开发者ID:CREASIG,项目名称:lizmap-web-client,代码行数:19,代码来源:admin.php

示例4: _updateDatabase

 /**
  * private function to handle the database migration
  */
 private function _updateDatabase()
 {
     //1) if the file installer.ini.php does not exist we cant install jelix nor havefnubb;
     // then the application has not been installed with jelix 1.2
     // so we copy the installer.ini.php build for the application havefnubb
     //2) if the file exists, that means jelix 1.2 is "installed"
     // so no need to try to install jelix
     if (!file_exists(jApp::configPath() . 'installer.ini.php')) {
         copy(dirname(__FILE__) . '/../../../install/installer.ini.php', jApp::configPath() . 'installer.ini.php');
     }
     jApp::loadConfig('havefnubb/config.ini.php');
     //get the dbprofils file
     $dbProfile = jIniFile::read(jApp::configPath() . jApp::config()->dbProfils);
     //get the default profile
     $tools = jDb::getTools($dbProfile['default']);
     // migrate from 1.3.6 to 1.4.0
     $tools->execSQLScript(dirname(__FILE__) . '/../../../sql/update_to_1.4.0.mysql.sql');
 }
开发者ID:havefnubb,项目名称:havefnubb,代码行数:21,代码来源:migrate.page.php

示例5: checkAppOpened

<?php

/**
* @package   lizmap
* @subpackage lizmap
* @author    3liz
* @copyright 2011 3liz
* @link      http://3liz.com
* @license    Mozilla Public License : http://www.mozilla.org/MPL/
*/
require '../application.init.php';
require JELIX_LIB_CORE_PATH . 'request/jClassicRequest.class.php';
checkAppOpened();
// Charge la configuration
jApp::loadConfig('index/config.ini.php');
// nouveau coordinateur, que l'on indique à jApp
jApp::setCoord(new jCoordinator());
// Nouvel objet request, que l'on passe au coordinateur, pour traiter le routage.
jApp::coord()->process(new jClassicRequest());
开发者ID:CREASIG,项目名称:lizmap-web-client,代码行数:19,代码来源:index.php

示例6: checkAppOpened

<?php

require_once '../application.init.php';
checkAppOpened();
jApp::loadConfig('soap/config.ini.php');
ini_set("soap.wsdl_cache_enabled", "0");
// disabling PHP's WSDL cache
$jelix = new jSoapCoordinator();
jApp::setCoord($jelix);
$jelix->request = new jSoapRequest();
$jelix->request->initService();
$jelix->processSoap();
开发者ID:jelix,项目名称:soap-server-module,代码行数:12,代码来源:soap.php

示例7: jCoordinator

<?php

/**
* @package  testapp
* @subpackage scripts
* @author       Laurent Jouanneau
* @contributor
* @copyright
*/
require_once '../application.init.php';
require_once JELIX_LIB_CORE_PATH . 'request/jCmdLineRequest.class.php';
jApp::loadConfig('cmdline/configtests.ini.php');
$jelix = new jCoordinator();
$jelix->process(new jCmdLineRequest());
开发者ID:CREASIG,项目名称:lizmap-web-client,代码行数:14,代码来源:tests.php

示例8: header

<?php

/**
* @package   havefnubb
* @subpackage havefnubb
* @author    FoxMaSk
* @copyright 2008-2011 FoxMaSk
* @link      http://havefnubb.org
* @license  http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public Licence, see LICENCE file
*/
require 'havefnubb/application.init.php';
if (!isAppInstalled()) {
    header("location: install.php");
} else {
    require JELIX_LIB_CORE_PATH . 'request/jClassicRequest.class.php';
    jApp::loadConfig('havefnubb/config.ini.php');
    jApp::setCoord(new jCoordinator());
    jApp::coord()->process(new jClassicRequest());
}
开发者ID:havefnubb,项目名称:havefnubb,代码行数:19,代码来源:forums.php


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