当前位置: 首页>>代码示例>>PHP>>正文


PHP PHPExcel_Shared_String::_isIconvEnabled方法代码示例

本文整理汇总了PHP中PHPExcel_Shared_String::_isIconvEnabled方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPExcel_Shared_String::_isIconvEnabled方法的具体用法?PHP PHPExcel_Shared_String::_isIconvEnabled怎么用?PHP PHPExcel_Shared_String::_isIconvEnabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PHPExcel_Shared_String的用法示例。


在下文中一共展示了PHPExcel_Shared_String::_isIconvEnabled方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getIsIconvEnabled

 /**
  * Get whether iconv extension is available
  *
  * @return boolean
  */
 public static function getIsIconvEnabled()
 {
     if (isset(self::$_isIconvEnabled)) {
         return self::$_isIconvEnabled;
     }
     self::$_isIconvEnabled = function_exists('iconv') ? true : false;
     return self::$_isIconvEnabled;
 }
开发者ID:electromanlord,项目名称:sgd,代码行数:13,代码来源:String.php

示例2: getIsIconvEnabled

 /**
  * Get whether iconv extension is available
  *
  * @return boolean
  */
 public static function getIsIconvEnabled()
 {
     if (isset(self::$_isIconvEnabled)) {
         return self::$_isIconvEnabled;
     }
     // Fail if iconv doesn't exist
     if (!function_exists('iconv')) {
         self::$_isIconvEnabled = false;
         return false;
     }
     // Sometimes iconv is not working, and e.g. iconv('UTF-8', 'UTF-16LE', 'x') just returns false,
     if (!@iconv('UTF-8', 'UTF-16LE', 'x')) {
         self::$_isIconvEnabled = false;
         return false;
     }
     // Sometimes iconv_substr('A', 0, 1, 'UTF-8') just returns false in PHP 5.2.0
     // we cannot use iconv in that case either (http://bugs.php.net/bug.php?id=37773)
     if (!@iconv_substr('A', 0, 1, 'UTF-8')) {
         self::$_isIconvEnabled = false;
         return false;
     }
     // CUSTOM: IBM AIX iconv() does not work
     if (defined('PHP_OS') && @stristr(PHP_OS, 'AIX') && defined('ICONV_IMPL') && @strcasecmp(ICONV_IMPL, 'unknown') == 0 && defined('ICONV_VERSION') && @strcasecmp(ICONV_VERSION, 'unknown') == 0) {
         self::$_isIconvEnabled = false;
         return false;
     }
     // If we reach here no problems were detected with iconv
     self::$_isIconvEnabled = true;
     return true;
 }
开发者ID:Princelo,项目名称:bioerp,代码行数:35,代码来源:String.php

示例3: getIsIconvEnabled

 /**
  * Get whether iconv extension is available
  *
  * @return boolean
  */
 public static function getIsIconvEnabled()
 {
     if (isset(self::$_isIconvEnabled)) {
         return self::$_isIconvEnabled;
     }
     // Check that iconv exists
     // Sometimes iconv is not working, and e.g. iconv('UTF-8', 'UTF-16LE', 'x') just returns false,
     // we cannot use iconv when that happens
     // Also, sometimes iconv_substr('A', 0, 1, 'UTF-8') just returns false in PHP 5.2.0
     // we cannot use iconv in that case either (http://bugs.php.net/bug.php?id=37773)
     if (function_exists('iconv') && @iconv('UTF-8', 'UTF-16LE', 'x') && @iconv_substr('A', 0, 1, 'UTF-8')) {
         self::$_isIconvEnabled = true;
     } else {
         self::$_isIconvEnabled = false;
     }
     return self::$_isIconvEnabled;
 }
开发者ID:honj51,项目名称:taobaocrm,代码行数:22,代码来源:String.php

示例4: getIsIconvEnabled

 /**
  * Get whether iconv extension is available
  *
  * @return boolean
  */
 public static function getIsIconvEnabled()
 {
     if (isset(self::$_isIconvEnabled)) {
         return self::$_isIconvEnabled;
     }
     // Check that iconv exists
     // Sometimes iconv is not working, and e.g. iconv('UTF-8', 'UTF-16LE', 'x') just returns false,
     // we cannot use iconv when that happens
     if (function_exists('iconv') && @iconv('UTF-8', 'UTF-16LE', 'x')) {
         self::$_isIconvEnabled = true;
     } else {
         self::$_isIconvEnabled = false;
     }
     return self::$_isIconvEnabled;
 }
开发者ID:nopticon,项目名称:noptc,代码行数:20,代码来源:String.php

示例5: getIsIconvEnabled

 /**
  * Get whether iconv extension is available
  *
  * @return boolean
  */
 public static function getIsIconvEnabled()
 {
     if (isset(self::$_isIconvEnabled)) {
         return self::$_isIconvEnabled;
     }
     // IBM AIX iconv() does not work
     self::$_isIconvEnabled = function_exists('iconv') && !(defined('PHP_OS') && @stristr(PHP_OS, 'AIX') && defined('ICONV_IMPL') && @strcasecmp(ICONV_IMPL, 'unknown') == 0 && defined('ICONV_VERSION') && @strcasecmp(ICONV_VERSION, 'unknown') == 0) ? true : false;
     return self::$_isIconvEnabled;
 }
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:14,代码来源:String.php


注:本文中的PHPExcel_Shared_String::_isIconvEnabled方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。