本文整理汇总了PHP中Patchwork\Utf8\Bootup::initIconv方法的典型用法代码示例。如果您正苦于以下问题:PHP Bootup::initIconv方法的具体用法?PHP Bootup::initIconv怎么用?PHP Bootup::initIconv使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Patchwork\Utf8\Bootup
的用法示例。
在下文中一共展示了Bootup::initIconv方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: spl_autoload_register
// (does not work in safe mode)
@set_time_limit(120);
// include composer autoloader (if available)
if (@file_exists(INSTALL_PATH . 'vendor/autoload.php')) {
require INSTALL_PATH . 'vendor/autoload.php';
}
// include Roundcube Framework
require_once 'Roundcube/bootstrap.php';
// register autoloader for rcmail app classes
spl_autoload_register('rcmail_autoload');
// backward compatybility (to be removed)
require_once INSTALL_PATH . 'program/include/bc.php';
// load the UTF-8 portability layers from Patchwork
// don't load mbstring layer as it conflicts with Roundcube Framework (#1490280)
if (!function_exists('iconv')) {
\Patchwork\Utf8\Bootup::initIconv();
}
if (!function_exists('utf8_encode')) {
\Patchwork\Utf8\Bootup::initUtf8Encode();
}
/**
* PHP5 autoloader routine for dynamic class loading
*/
function rcmail_autoload($classname)
{
if (strpos($classname, 'rcmail') === 0) {
$filepath = INSTALL_PATH . "program/include/{$classname}.php";
if (is_readable($filepath)) {
include_once $filepath;
return true;
}