本文整理汇总了PHP中Smarty_Internal_Get_Include_Path::_include_path方法的典型用法代码示例。如果您正苦于以下问题:PHP Smarty_Internal_Get_Include_Path::_include_path方法的具体用法?PHP Smarty_Internal_Get_Include_Path::_include_path怎么用?PHP Smarty_Internal_Get_Include_Path::_include_path使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Smarty_Internal_Get_Include_Path
的用法示例。
在下文中一共展示了Smarty_Internal_Get_Include_Path::_include_path方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isNewIncludePath
/**
* Check if include path was updated
*
* @param \Smarty $smarty
*
* @return bool
*/
public static function isNewIncludePath(Smarty $smarty)
{
$_i_path = get_include_path();
if (self::$_include_path != $_i_path) {
self::$_include_dirs = array();
self::$_include_path = $_i_path;
$_dirs = (array) explode(PATH_SEPARATOR, $_i_path);
foreach ($_dirs as $_path) {
if ($_path[0] != '/' && isset($dir[1]) && $dir[1] != ':') {
$_path = $smarty->_realpath($_path . DS, true);
}
if (is_dir($_path)) {
self::$_include_dirs[] = $smarty->_realpath($_path . DS, true);
}
}
return true;
}
return false;
}