本文整理匯總了PHP中Smarty_Internal_Get_Include_Path::_include_dirs方法的典型用法代碼示例。如果您正苦於以下問題:PHP Smarty_Internal_Get_Include_Path::_include_dirs方法的具體用法?PHP Smarty_Internal_Get_Include_Path::_include_dirs怎麽用?PHP Smarty_Internal_Get_Include_Path::_include_dirs使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Smarty_Internal_Get_Include_Path
的用法示例。
在下文中一共展示了Smarty_Internal_Get_Include_Path::_include_dirs方法的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;
}