本文整理匯總了PHP中Flyspray::get_config_path方法的典型用法代碼示例。如果您正苦於以下問題:PHP Flyspray::get_config_path方法的具體用法?PHP Flyspray::get_config_path怎麽用?PHP Flyspray::get_config_path使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Flyspray
的用法示例。
在下文中一共展示了Flyspray::get_config_path方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: ini_set
// | Copyright (C) 2007 by Florian Florian Schmitz <floele@flyspray.org>
// +----------------------------------------------------------------------
// |
// | Copyright: See COPYING file that comes with this distribution
// +----------------------------------------------------------------------
//
@set_time_limit(0);
//do it fast damn it
ini_set('memory_limit', '64M');
// define basic stuff first.
define('IN_FS', 1);
define('BASEDIR', dirname(__FILE__));
define('APPLICATION_PATH', dirname(BASEDIR));
define('OBJECTS_PATH', APPLICATION_PATH . '/includes');
require_once OBJECTS_PATH . '/class.flyspray.php';
define('CONFIG_PATH', Flyspray::get_config_path(APPLICATION_PATH));
define('TEMPLATE_FOLDER', BASEDIR . '/templates/');
$conf = @parse_ini_file(CONFIG_PATH, true) or die('Cannot open config file at ' . CONFIG_PATH);
$borked = str_replace('a', 'b', array(-1 => -1));
if (!isset($borked[-1])) {
die("Flyspray cannot run here, sorry :-( \n PHP 4.4.x/5.0.x is buggy on your 64-bit system; you must upgrade to PHP 5.1.x\n" . "or higher. ABORTING. (http://bugs.php.net/bug.php?id=34879 for details)\n");
}
require_once OBJECTS_PATH . '/fix.inc.php';
require_once OBJECTS_PATH . '/class.gpc.php';
require_once OBJECTS_PATH . '/i18n.inc.php';
# fake objects for load_translation()
class user
{
var $infos = array();
}
class project
示例2: define
<?php
/**
* Basic constants/variables required for flyspray operation
*
* @notes be a real paranoid here.
* @version $Id$
* @notes : do not modify this file, use constants.$_SERVER['SERVER_NAME'].php if you need
* to alter some behaviuor.
*/
if (!defined('BASEDIR')) {
define('BASEDIR', dirname(dirname(__FILE__)));
}
// Change this line if you move flyspray.conf.php elsewhere
$conf = @parse_ini_file(Flyspray::get_config_path(), true);
// $baseurl
if (isset($conf['general']['force_baseurl']) && $conf['general']['force_baseurl'] != '') {
$baseurl = $conf['general']['force_baseurl'];
} else {
if (!isset($webdir)) {
$webdir = dirname($_SERVER['SCRIPT_NAME']);
if (!$webdir) {
$webdir = dirname(htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'utf-8'));
}
if (substr($webdir, -9) == 'index.php') {
$webdir = dirname($webdir);
}
}
$baseurl = rtrim(Flyspray::absoluteURI($webdir), '/\\') . '/';
}
define('NOTIFY_TASK_OPENED', 1);
示例3: define
define('IN_FS', 1);
define('IN_UPGRADER', 1);
define('BASEDIR', dirname(__FILE__));
define('OBJECTS_PATH', BASEDIR . '/../includes');
define('TEMPLATE_FOLDER', BASEDIR . '/../setup/templates/');
$borked = str_replace('a', 'b', array(-1 => -1));
if (!isset($borked[-1])) {
die("Flyspray cannot run here, sorry :-( \n PHP 4.4.x/5.0.x is buggy on your 64-bit system; you must upgrade to PHP 5.1.x\n" . "or higher. ABORTING. (http://bugs.php.net/bug.php?id=34879 for details)\n");
}
require_once OBJECTS_PATH . '/fix.inc.php';
require_once OBJECTS_PATH . '/class.gpc.php';
require_once OBJECTS_PATH . '/class.flyspray.php';
require_once OBJECTS_PATH . '/constants.inc.php';
require_once OBJECTS_PATH . '/class.database.php';
@(require_once OBJECTS_PATH . '/class.tpl.php');
define('CONFIG_PATH', Flyspray::get_config_path(BASEDIR . '/../'));
$conf = @parse_ini_file(CONFIG_PATH, true) or die('Cannot open config file at ' . CONFIG_PATH);
$db = NewDatabase($conf['database']);
$db->setOption('portability', MDB2_PORTABILITY_ALL ^ MDB2_PORTABILITY_FIX_CASE);
// ---------------------------------------------------------------------
// Application Web locations
// ---------------------------------------------------------------------
$fs = new Flyspray();
define('APPLICATION_SETUP_INDEX', Flyspray::absoluteURI());
define('UPGRADE_VERSION', Flyspray::base_version($fs->version));
// Get installed version
$installed_version = $db->x->GetOne('SELECT pref_value FROM {prefs} WHERE pref_name = ?', null, 'fs_ver');
$page = new Tpl();
$page->assign('title', 'Upgrade ');
$page->assign('short_version', UPGRADE_VERSION);
// ---------------------------------------------------------------------