本文整理汇总了PHP中phpDocumentor_parse_ini_file函数的典型用法代码示例。如果您正苦于以下问题:PHP phpDocumentor_parse_ini_file函数的具体用法?PHP phpDocumentor_parse_ini_file怎么用?PHP phpDocumentor_parse_ini_file使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了phpDocumentor_parse_ini_file函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dirname
/**
* common file information
*/
include_once PHPDOC_WEBROOT_DIR . "/phpDocumentor/common.inc.php";
include_once PHPDOC_WEBROOT_DIR . "/HTML_TreeMenu-1.1.2/TreeMenu.php";
include_once PHPDOC_WEBROOT_DIR . "/docbuilder/includes/utilities.php";
// set up include path so we can find all files, no matter what
$GLOBALS['_phpDocumentor_install_dir'] = dirname(dirname(realpath(__FILE__)));
// add my directory to the include path, and make it first, should fix any errors
if (substr(PHP_OS, 0, 3) == 'WIN') {
ini_set('include_path', $GLOBALS['_phpDocumentor_install_dir'] . ';' . ini_get('include_path'));
} else {
ini_set('include_path', $GLOBALS['_phpDocumentor_install_dir'] . ':' . ini_get('include_path'));
}
// find the .ini directory by parsing phpDocumentor.ini and extracting _phpDocumentor_options[userdir]
$ini = phpDocumentor_parse_ini_file($_phpDocumentor_install_dir . PATH_DELIMITER . 'phpDocumentor.ini', true);
if (isset($ini['_phpDocumentor_options']['userdir'])) {
$configdir = $ini['_phpDocumentor_options']['userdir'];
} else {
$configdir = $_phpDocumentor_install_dir . '/user';
}
}
// allow the user to change this at runtime
if (!empty($_REQUEST['altuserdir'])) {
$configdir = $_REQUEST['altuserdir'];
}
?>
<html>
<head>
<title>
File browser
示例2: parseIni
/**
* Parse configuration file phpDocumentor.ini
*/
function parseIni()
{
phpDocumentor_out("Parsing configuration file phpDocumentor.ini...\n");
flush();
if ('C:\\php\\pear\\data' != '@' . 'DATA-DIR@') {
$options = phpDocumentor_parse_ini_file(str_replace('\\', '/', 'C:\\php\\pear\\data/PhpDocumentor') . PATH_DELIMITER . 'phpDocumentor.ini', true);
phpDocumentor_out(" (found in " . 'C:\\php\\pear\\data/PhpDocumentor' . PATH_DELIMITER . ")...\n");
} else {
$options = phpDocumentor_parse_ini_file(str_replace('\\', '/', $GLOBALS['_phpDocumentor_install_dir']) . PATH_DELIMITER . 'phpDocumentor.ini', true);
phpDocumentor_out(" (found in " . $GLOBALS['_phpDocumentor_install_dir'] . PATH_DELIMITER . ")...\n");
}
if (!$options) {
print "ERROR: cannot open phpDocumentor.ini in directory " . $GLOBALS['_phpDocumentor_install_dir'] . "\n";
print "-Is phpdoc in either the path or include_path in your php.ini file?";
exit;
}
foreach ($options as $var => $values) {
if ($var != 'DEBUG') {
// phpDocumentor_out("\n$var");
if ($var != '_phpDocumentor_setting' && $var != '_phpDocumentor_options' && $var != '_phpDocumentor_install_dir') {
$values = array_values($values);
}
// fancy_debug("\n$var",$values);
$GLOBALS[$var] = $values;
}
}
phpDocumentor_out("\ndone\n");
flush();
/** Debug Constant */
if (!defined('PHPDOCUMENTOR_DEBUG')) {
define("PHPDOCUMENTOR_DEBUG", $options['DEBUG']['PHPDOCUMENTOR_DEBUG']);
}
if (!defined('PHPDOCUMENTOR_KILL_WHITESPACE')) {
define("PHPDOCUMENTOR_KILL_WHITESPACE", $options['DEBUG']['PHPDOCUMENTOR_KILL_WHITESPACE']);
}
$GLOBALS['_phpDocumentor_cvsphpfile_exts'] = $GLOBALS['_phpDocumentor_phpfile_exts'];
foreach ($GLOBALS['_phpDocumentor_cvsphpfile_exts'] as $key => $val) {
$GLOBALS['_phpDocumentor_cvsphpfile_exts'][$key] = "{$val},v";
}
// none of this stuff is used anymore
if (isset($GLOBALS['_phpDocumentor_html_allowed'])) {
$___htmltemp = array_flip($GLOBALS['_phpDocumentor_html_allowed']);
$___html1 = array();
foreach ($___htmltemp as $tag => $trans) {
$___html1['<' . $tag . '>'] = htmlentities('<' . $tag . '>');
$___html1['</' . $tag . '>'] = htmlentities('</' . $tag . '>');
}
$GLOBALS['phpDocumentor___html'] = array_flip($___html1);
}
}
示例3: phpDocumentor_parse_ini_file
// | obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +------------------------------------------------------------------------+
//
$root_dir = 'PhpDocumentor';
if (!function_exists('version_compare')) {
print "phpDocumentor requires PHP version 4.1.0 or greater to function";
exit;
}
/**
* common file information
*/
include_once "PhpDocumentor/phpDocumentor/common.inc.php";
include_once "/opt/lampp/lib/php/data/PhpDocumentor/docbuilder/includes/utilities.php";
// find the .ini directory by parsing phpDocumentor.ini and extracting _phpDocumentor_options[userdir]
$ini = phpDocumentor_parse_ini_file('/opt/lampp/lib/php/data/PhpDocumentor/phpDocumentor.ini', true);
if (isset($ini['_phpDocumentor_options']['userdir'])) {
$configdir = $ini['_phpDocumentor_options']['userdir'];
} else {
$configdir = '/opt/lampp/lib/php/data/PhpDocumentor/user';
}
// allow the user to change this at runtime
if (!empty($_REQUEST['altuserdir'])) {
$configdir = $_REQUEST['altuserdir'];
}
// assign the available converters
$converters = array("HTML:frames:default" => 'HTML:frames:default', "HTML:frames:earthli" => 'HTML:frames:earthli', "HTML:frames:l0l33t" => 'HTML:frames:l0l33t', "HTML:frames:phpdoc.de" => 'HTML:frames:phpdoc.de', "HTML:frames:phphtmllib" => 'HTML:frames:phphtmllib', "HTML:frames:phpedit" => 'HTML:frames:phpedit', "HTML:frames:DOM/default" => 'HTML:frames:DOM/default', "HTML:frames:DOM/earthli" => 'HTML:frames:DOM/earthli', "HTML:frames:DOM/l0l33t" => 'HTML:frames:DOM/l0l33t', "HTML:frames:DOM/phpdoc.de" => 'HTML:frames:DOM/phpdoc.de', "HTML:frames:DOM/phphtmllib" => 'HTML:frames:DOM/phphtmllib', "HTML:Smarty:default" => 'HTML:Smarty:default', "HTML:Smarty:HandS" => 'HTML:Smarty:HandS', "HTML:Smarty:PHP" => 'HTML:Smarty:PHP', "PDF:default:default" => 'PDF:default:default', "CHM:default:default" => 'CHM:default:default', "XML:DocBook/peardoc2:default" => 'XML:DocBook/peardoc2:default');
// compile a list of available screen shots
$convScreenShots = array();
$path = '/opt/lampp/lib/php/data/PhpDocumentor/docbuilder/images/';
if ($dir = opendir($path)) {
示例4: phpDocumentor_parse_ini_file
//
/**
* common file information
*/
require_once 'PhpDocumentor/phpDocumentor/common.inc.php';
require_once 'PhpDocumentor/HTML_TreeMenu-1.1.2/TreeMenu.php';
require_once '/opt/lampp/lib/php/data' . PATH_DELIMITER . 'PhpDocumentor/docbuilder/includes/utilities.php';
$root_dir = 'PhpDocumentor';
if (!function_exists('version_compare')) {
print "phpDocumentor requires PHP version 4.1.0 or greater to function";
exit;
}
// set up include path so we can find all files, no matter what
$GLOBALS['_phpDocumentor_install_dir'] = $root_dir;
// find the .ini directory by parsing phpDocumentor.ini and extracting _phpDocumentor_options[userdir]
$ini = phpDocumentor_parse_ini_file('/opt/lampp/lib/php/data' . PATH_DELIMITER . 'PhpDocumentor/phpDocumentor.ini', true);
if (isset($ini['_phpDocumentor_options']['userdir'])) {
$configdir = $ini['_phpDocumentor_options']['userdir'];
} else {
$configdir = '/opt/lampp/lib/php/data' . PATH_DELIMITER . 'PhpDocumentor/user';
}
// allow the user to change this at runtime
if (!empty($_REQUEST['altuserdir'])) {
$configdir = $_REQUEST['altuserdir'];
}
?>
<html>
<head>
<title>
File browser
</title>