本文整理汇总了PHP中ARC2::getIncPath方法的典型用法代码示例。如果您正苦于以下问题:PHP ARC2::getIncPath方法的具体用法?PHP ARC2::getIncPath怎么用?PHP ARC2::getIncPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ARC2
的用法示例。
在下文中一共展示了ARC2::getIncPath方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: inc
static function inc($f, $path = '')
{
$prefix = 'ARC2';
if (preg_match('/^([^\\_]+)\\_(.*)$/', $f, $m)) {
$prefix = $m[1];
$f = $m[2];
}
$inc_path = $path ? $path : ARC2::getIncPath($f);
$path = $inc_path . $prefix . '_' . urlencode($f) . '.php';
if (file_exists($path)) {
return include_once $path;
}
/* safe-mode hack */
if (@(include_once $path)) {
return 1;
}
/* try other path */
if ($prefix != 'ARC2') {
$path = $inc_path . strtolower($prefix) . '/' . $prefix . '_' . urlencode($f) . '.php';
if (file_exists($path)) {
return include_once $path;
}
/* safe-mode hack */
if (@(include_once $path)) {
return 1;
}
}
return 0;
}
示例2: __init
function __init()
{
/* base, time_limit */
$this->inc_path = ARC2::getIncPath();
$this->base = $this->v('base', ARC2::getScriptURI(), $this->a);
$this->errors = array();
$this->warnings = array();
}
示例3: __init
function __init()
{
/* base, time_limit */
if (!$_POST && isset($GLOBALS['HTTP_RAW_POST_DATA'])) {
parse_str($GLOBALS['HTTP_RAW_POST_DATA'], $_POST);
}
/* php5 bug */
$this->inc_path = ARC2::getIncPath();
$this->ns_count = 0;
$this->nsp = array('http://www.w3.org/1999/02/22-rdf-syntax-ns#' => 'rdf');
$this->used_ns = array('http://www.w3.org/1999/02/22-rdf-syntax-ns#');
$this->ns = $this->v('ns', array(), $this->a);
$this->base = $this->v('base', ARC2::getRequestURI(), $this->a);
$this->errors = array();
$this->warnings = array();
$this->adjust_utf8 = $this->v('adjust_utf8', 0, $this->a);
$this->max_errors = $this->v('max_errors', 25, $this->a);
}
示例4: __init
function __init()
{
/* base, time_limit */
if (!$_POST && isset($GLOBALS['HTTP_RAW_POST_DATA'])) {
parse_str($GLOBALS['HTTP_RAW_POST_DATA'], $_POST);
}
/* php5 bug */
$this->inc_path = ARC2::getIncPath();
$this->ns_count = 0;
$rdf = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#';
$this->nsp = array($rdf => 'rdf');
$this->used_ns = array($rdf);
$this->ns = array_merge(array('rdf' => $rdf), $this->v('ns', array(), $this->a));
$this->base = $this->v('base', ARC2::getRequestURI(), $this->a);
$this->errors = array();
$this->warnings = array();
$this->adjust_utf8 = $this->v('adjust_utf8', 0, $this->a);
$this->max_errors = $this->v('max_errors', 25, $this->a);
$this->has_pcre_unicode = @preg_match('/\\pL/u', 'test');
/* \pL = block/point which is a Letter */
}
示例5: testGetIncPath
public function testGetIncPath()
{
$actual = ARC2::getIncPath('RDFParser');
$this->assertStringEndsWith('parsers/', $actual, 'should create correct path');
$this->assertTrue(is_dir($actual), 'should create correct pointer');
}