• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP gd_info函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中gd_info函数的典型用法代码示例。如果您正苦于以下问题:PHP gd_info函数的具体用法?PHP gd_info怎么用?PHP gd_info使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: syscheck

function syscheck($items)
{
    foreach ($items as $key => $item) {
        if ($item['list'] == 'php') {
            $items[$key]['current'] = PHP_VERSION;
        } elseif ($item['list'] == 'upload') {
            $items[$key]['current'] = @ini_get('file_uploads') ? ini_get('upload_max_filesize') : 'unknow';
        } elseif ($item['list'] == 'gdversion') {
            $tmp = function_exists('gd_info') ? gd_info() : array();
            $items[$key]['current'] = empty($tmp['GD Version']) ? 'noext' : $tmp['GD Version'];
            unset($tmp);
        } elseif ($item['list'] == 'disk') {
            if (function_exists('disk_free_space')) {
                $items[$key]['current'] = floor(disk_free_space(admin_ROOT) / (1024 * 1024)) . 'M';
            } else {
                $items[$key]['current'] = 'unknow';
            }
        } elseif (isset($item['c'])) {
            $items[$key]['current'] = constant($item['c']);
        }
        $items[$key]['status'] = 1;
        if ($item['r'] != 'notset' && strcmp($items[$key]['current'], $item['r']) < 0) {
            $items[$key]['status'] = 0;
        }
    }
    return $items;
}
开发者ID:huangs0928,项目名称:zzlangshi,代码行数:27,代码来源:fun_center.php


示例2: listAction

 public function listAction()
 {
     $form = new \Control\Forms();
     $form->setTitle('Информационный модуль');
     $form->setTemplate('list');
     $form->addHead(array(array('width' => 100), array('width' => 300)));
     $rows = array();
     // версия CMS
     $rows[] = array('Aquarel CMS', $this->conf->ac_ver);
     // версия PHP
     $rows[] = array('PHP', phpversion());
     // версия GD-библиотеки
     $gd = gd_info();
     $rows[] = array('GD', $gd['GD Version']);
     // список установленных модулей
     $modules_installed = array();
     $modules = $this->em->getRepository('Modules\\Entities\\Module')->findBy(array('install' => 1, 'active' => 1, 'group' => 'custom'), array('name' => 'ASC'));
     foreach ($modules as $module) {
         $modules_installed[] = $module->name . ' (' . $module->title . ')';
     }
     $rows[] = array('Установленные модули', implode('<br/>', $modules_installed));
     $form->addRows($rows);
     $output = $form->render();
     return $output;
 }
开发者ID:jfkz,项目名称:aquarel-cms,代码行数:25,代码来源:Controller.php


示例3: check

 public static function check()
 {
     if (!function_exists('gd_info')) {
         throw new Kohana_Exception('GD is either not installed or not enabled, check your configuration');
     }
     if (defined('GD_BUNDLED')) {
         // Get the version via a constant, available in PHP 5.
         Image_GD::$_bundled = GD_BUNDLED;
     } else {
         // Get the version information
         $info = gd_info();
         // Extract the bundled status
         Image_GD::$_bundled = (bool) preg_match('/\\bbundled\\b/i', $info['GD Version']);
     }
     if (defined('GD_VERSION')) {
         // Get the version via a constant, available in PHP 5.2.4+
         $version = GD_VERSION;
     } else {
         // Get the version information
         $info = gd_info();
         // Extract the version number
         preg_match('/\\d+\\.\\d+(?:\\.\\d+)?/', $info['GD Version'], $matches);
         // Get the major version
         $version = $matches[0];
     }
     if (!version_compare($version, '2.0.1', '>=')) {
         throw new Kohana_Exception('Image_GD requires GD version :required or greater, you have :version', array('required' => '2.0.1', ':version' => $version));
     }
     return Image_GD::$_checked = TRUE;
 }
开发者ID:homm,项目名称:image,代码行数:30,代码来源:gd.php


示例4: gd_library_information

 /** Print GD library information */
 static function gd_library_information()
 {
     header('Content-type: text/plain');
     echo 'GD Library Information';
     echo "\n\n";
     echo array_format(gd_info());
 }
开发者ID:jijkoun,项目名称:ssscrape,代码行数:8,代码来源:image.test.php


示例5: env_check

/**
 * ============================================================================
 * WSTMall开源商城
 * 官网地址:http://www.wstmall.com 
 * 联系QQ:707563272
 * ============================================================================
 */
function env_check(&$env_items)
{
    foreach ($env_items as $key => $item) {
        $env_items[$key]['status'] = 1;
        if ($key == 'os') {
            $env_items[$key]['current'] = PHP_OS;
        } elseif ($key == 'php') {
            $env_items[$key]['current'] = PHP_VERSION;
        } elseif ($key == 'attachmentupload') {
            if (@ini_get('file_uploads')) {
                $env_items[$key]['current'] = ini_get('upload_max_filesize');
            } else {
                $env_items[$key]['status'] = -1;
                $env_items[$key]['current'] = '没有开启文件上传';
            }
        } elseif ($key == 'gdversion') {
            if (extension_loaded('gd')) {
                $tmp = gd_info();
                $env_items[$key]['current'] = empty($tmp['GD Version']) ? '' : $tmp['GD Version'];
                unset($tmp);
            } else {
                $env_items[$key]['current'] = "没有开启GD扩展";
                $env_items[$key]['status'] = -1;
            }
        } elseif ($key == 'diskspace') {
            if (function_exists('disk_free_space')) {
                $env_items[$key]['current'] = floor(disk_free_space(INSTALL_ROOT) / (1024 * 1024)) . 'M';
            } else {
                $env_items[$key]['current'] = '未知的磁盘空间';
                $env_items[$key]['status'] = 0;
            }
        }
    }
    return $env_items;
}
开发者ID:lihuafeng,项目名称:wstmall,代码行数:42,代码来源:install_function.php


示例6: check_env

/**
 * 系统环境检测
 * @return array 系统环境数据
 * @author jry <[email protected]>
 */
function check_env()
{
    $items = array('os' => array('title' => '操作系统', 'limit' => '不限制', 'current' => PHP_OS, 'icon' => 'glyphicon-ok text-success'), 'php' => array('title' => 'PHP版本', 'limit' => '5.3+', 'current' => PHP_VERSION, 'icon' => 'glyphicon-ok text-success'), 'upload' => array('title' => '附件上传', 'limit' => '不限制', 'current' => ini_get('file_uploads') ? ini_get('upload_max_filesize') : '未知', 'icon' => 'glyphicon-ok text-success'), 'gd' => array('title' => 'GD库', 'limit' => '2.0+', 'current' => '未知', 'icon' => 'glyphicon-ok text-success'), 'disk' => array('title' => '磁盘空间', 'limit' => '100M+', 'current' => '未知', 'icon' => 'glyphicon-ok text-success'));
    //PHP环境检测
    if ($items['php']['current'] < 5.3) {
        $items['php']['icon'] = 'glyphicon-remove text-danger';
        session('error', true);
    }
    //GD库检测
    $tmp = function_exists('gd_info') ? gd_info() : array();
    if (!$tmp['GD Version']) {
        $items['gd']['current'] = '未安装';
        $items['gd']['icon'] = 'glyphicon-remove text-danger';
        session('error', true);
    } else {
        $items['gd']['current'] = $tmp['GD Version'];
    }
    unset($tmp);
    //磁盘空间检测
    if (function_exists('disk_free_space')) {
        $disk_size = floor(disk_free_space('./') / (1024 * 1024)) . 'M';
        $items['disk']['current'] = $disk_size . 'MB';
        if ($disk_size < 100) {
            $items['disk']['icon'] = 'glyphicon-remove text-danger';
            session('error', true);
        }
    }
    return $items;
}
开发者ID:VampireMe,项目名称:corethink,代码行数:34,代码来源:function.php


示例7: check_env

/**
 * 系统环境检测
 * @return array 系统环境数据
 */
function check_env()
{
    $items = array('os' => array('操作系统', '不限制', '类Unix', PHP_OS, 'success'), 'php' => array('PHP版本', '5.3', '5.3+', PHP_VERSION, 'success'), 'upload' => array('附件上传', '不限制', '2M+', '未知', 'success'), 'gd' => array('GD库', '2.0', '2.0+', '未知', 'success'), 'disk' => array('磁盘空间', '5M', '不限制', '未知', 'success'));
    //PHP环境检测
    if ($items['php'][3] < $items['php'][1]) {
        $items['php'][4] = 'error';
        session('error', true);
    }
    //附件上传检测
    if (@ini_get('file_uploads')) {
        $items['upload'][3] = ini_get('upload_max_filesize');
    }
    //GD库检测
    $tmp = function_exists('gd_info') ? gd_info() : array();
    if (empty($tmp['GD Version'])) {
        $items['gd'][3] = '未安装';
        $items['gd'][4] = 'error';
        session('error', true);
    } else {
        $items['gd'][3] = $tmp['GD Version'];
    }
    unset($tmp);
    //磁盘空间检测
    if (function_exists('disk_free_space')) {
        $items['disk'][3] = floor(disk_free_space(INSTALL_APP_PATH) / (1024 * 1024)) . 'M';
    }
    return $items;
}
开发者ID:chenpusn,项目名称:haozhixian_bak,代码行数:32,代码来源:function.php


示例8: check

 /**
  * Checks if GD is enabled and verify that key methods exist, some of which require GD to
  * be bundled with PHP.  Exceptions will be thrown from those methods when GD is not
  * bundled.
  *
  * @return  boolean
  */
 public static function check()
 {
     if (!function_exists('gd_info')) {
         throw new Kohana_Exception('GD is either not installed or not enabled, check your configuration');
     }
     $functions = array(Image_GD::IMAGEROTATE, Image_GD::IMAGECONVOLUTION, Image_GD::IMAGEFILTER, Image_GD::IMAGELAYEREFFECT);
     foreach ($functions as $function) {
         Image_GD::$_available_functions[$function] = function_exists($function);
     }
     if (defined('GD_VERSION')) {
         // Get the version via a constant, available in PHP 5.2.4+
         $version = GD_VERSION;
     } else {
         // Get the version information
         $info = gd_info();
         // Extract the version number
         preg_match('/\\d+\\.\\d+(?:\\.\\d+)?/', $info['GD Version'], $matches);
         // Get the major version
         $version = $matches[0];
     }
     if (!version_compare($version, '2.0.1', '>=')) {
         throw new Kohana_Exception('Image_GD requires GD version :required or greater, you have :version', array('required' => '2.0.1', ':version' => $version));
     }
     return Image_GD::$_checked = TRUE;
 }
开发者ID:lz1988,项目名称:stourwebcms,代码行数:32,代码来源:gd.php


示例9: actionIndex

 public function actionIndex()
 {
     if (version_compare(PHP_VERSION, '4.3', '<')) {
         echo 'php版本过低,请先安装php4.3以上版本';
         exist;
     }
     $requirementsChecker = new RequirementChecker();
     $gdMemo = $imagickMemo = '启用验证码时需要安装php的gd组件或imagick组件。';
     $gdOK = $imagickOK = false;
     if (extension_loaded('imagick')) {
         $imagick = new Imagick();
         $imagickFormats = $imagick->queryFormats('PNG');
         if (in_array('PNG', $imagickFormats)) {
             $imagickOK = true;
         } else {
             $imagickMemo = 'Imagick组件不支持png。';
         }
     }
     if (extension_loaded('gd')) {
         $gdInfo = gd_info();
         if (!empty($gdInfo['FreeType Support'])) {
             $gdOK = true;
         } else {
             $gdMemo = 'gd组件不支持FreeType。';
         }
     }
     /**
      * Adjust requirements according to your application specifics.
      */
     $requirements = array(array('name' => 'PHP版本', 'mandatory' => true, 'condition' => version_compare(PHP_VERSION, '5.4.0', '>='), 'by' => '<a href="http://www.yiiframework.com">Yii Framework</a>', 'memo' => 'PHP 5.4.0及以上'), array('name' => 'config目录写权限', 'mandatory' => true, 'condition' => is_writeable(Yii::getAlias('@app/config')), 'by' => '<a href="http://simpleforum.org">Simple Forum</a>', 'memo' => 'config目录需要写权限'), array('name' => 'runtime目录写权限', 'mandatory' => true, 'condition' => is_writeable(Yii::getAlias('@app/runtime')), 'by' => '<a href="http://simpleforum.org">Simple Forum</a>', 'memo' => 'runtime目录需要写权限'), array('name' => 'web/assets目录写权限', 'mandatory' => true, 'condition' => is_writeable(Yii::getAlias('@webroot/assets')), 'by' => '<a href="http://simpleforum.org">Simple Forum</a>', 'memo' => 'web/assets目录需要写权限'), array('name' => 'web/avatar目录写权限', 'mandatory' => true, 'condition' => is_writeable(Yii::getAlias('@webroot/avatar')), 'by' => '<a href="http://simpleforum.org">Simple Forum</a>', 'memo' => 'web/avatar目录需要写权限'), array('name' => 'PDO扩展', 'mandatory' => true, 'condition' => extension_loaded('pdo'), 'by' => 'DB连接', 'memo' => 'MySQL连接。'), array('name' => 'PDO_MySQL扩展', 'mandatory' => true, 'condition' => extension_loaded('pdo_mysql'), 'by' => 'DB连接', 'memo' => 'MySQL连接。'), array('name' => 'OpenSSL扩展', 'mandatory' => true, 'condition' => extension_loaded('openssl'), 'by' => '<a href="http://simpleforum.org">Simple Forum</a>', 'memo' => '用于用户密码加密'), array('name' => 'Memcache(d)扩展', 'mandatory' => false, 'condition' => extension_loaded('memcache') || extension_loaded('memcached'), 'by' => 'memcache/memcached缓存', 'memo' => '用于开启缓存'), array('name' => 'APC扩展', 'mandatory' => false, 'condition' => extension_loaded('apc'), 'by' => 'APC缓存', 'memo' => '用于开启缓存'), array('name' => 'GD扩展(支持FreeType)', 'mandatory' => false, 'condition' => $gdOK, 'by' => '验证码', 'memo' => $gdMemo), array('name' => 'ImageMagick扩展(支持png)', 'mandatory' => false, 'condition' => $imagickOK, 'by' => '验证码', 'memo' => $imagickMemo), 'phpExposePhp' => array('name' => 'php.ini的expose_php设值', 'mandatory' => false, 'condition' => $requirementsChecker->checkPhpIniOff("expose_php"), 'by' => '安全问题', 'memo' => '请修改为 expose_php = Off'), 'phpAllowUrlInclude' => array('name' => 'php.ini的allow_url_include设值', 'mandatory' => false, 'condition' => $requirementsChecker->checkPhpIniOff("allow_url_include"), 'by' => '安全问题', 'memo' => '请修改为 allow_url_include = Off'), 'phpSmtp' => array('name' => 'PHP SMTP邮件', 'mandatory' => false, 'condition' => strlen(ini_get('SMTP')) > 0, 'by' => '邮件', 'memo' => '用于发送邮件'), array('name' => 'MBString扩展', 'mandatory' => true, 'condition' => extension_loaded('mbstring'), 'by' => '<a href="http://www.php.net/manual/en/book.mbstring.php">Multibyte string</a> processing', 'memo' => ''), array('name' => 'Reflection扩展', 'mandatory' => true, 'condition' => class_exists('Reflection', false), 'by' => '<a href="http://www.yiiframework.com">Yii Framework</a>'), array('name' => 'PCRE扩展', 'mandatory' => true, 'condition' => extension_loaded('pcre'), 'by' => '<a href="http://www.yiiframework.com">Yii Framework</a>'), array('name' => 'SPL扩展', 'mandatory' => true, 'condition' => extension_loaded('SPL'), 'by' => '<a href="http://www.yiiframework.com">Yii Framework</a>'));
     $requirementsChecker->check($requirements);
     return $this->render('index', ['check' => $requirementsChecker]);
 }
开发者ID:0ps,项目名称:simpleforum,代码行数:33,代码来源:InstallController.php


示例10: gd_info

function gd_info()
{
    if (null !== GdAdapterTest::$mockGdInfoResult) {
        return GdAdapterTest::$mockGdInfoResult;
    }
    return \gd_info();
}
开发者ID:phower,项目名称:image,代码行数:7,代码来源:functions.php


示例11: getInstallInfo

 public function getInstallInfo()
 {
     $this->installinfo['php_version'] = phpversion();
     if (!session_id()) {
         $this->installerror['session_disabled'] = true;
     }
     $this->installinfo['config_file'] = $this->bsiCoreRoot . $this->bsiDBCONFile;
     // check writable settings file
     if (!is_writable($this->installinfo['config_file'])) {
         $this->installerror['config_notwritable'] = true;
     }
     $this->installinfo['gallery_path'] = $this->bsiCoreRoot . $this->bsiGallery;
     if (!$this->checkFolder($this->installinfo['gallery_path'])) {
         $this->installerror['gallery_notwritable'] = true;
     }
     if (!in_array("gd", get_loaded_extensions())) {
         $this->installerror['gd_notinstalled'] = true;
         $this->installerror['gd_versionnotpermit'] = true;
     }
     if (!$this->installerror['gd_notinstalled'] && function_exists('gd_info')) {
         $info = gd_info();
         $this->installinfo['gd_version'] = preg_replace("/[^\\d\\.]/", "", $info['GD Version']) * 1;
         if ($this->installinfo['gd_version'] < 2) {
             $this->installerror['gd_versionnotpermit'] = true;
         }
     }
     if (!in_array("mysql", get_loaded_extensions())) {
         $this->installerror['mysql_notavailable'] = true;
     }
 }
开发者ID:asimpatrasc,项目名称:elance-clone,代码行数:30,代码来源:install.class.php


示例12: __construct

	/**
	 * Class constructor.
	 *
	 * @param   mixed  $source  Either a file path for a source image or a GD resource handler for an image.
	 *
	 * @since   11.3
	 * @throws  RuntimeException
	 */
	public function __construct($source = null)
	{
		// Verify that GD support for PHP is available.
		if (!extension_loaded('gd'))
		{
			// @codeCoverageIgnoreStart
			JLog::add('The GD extension for PHP is not available.', JLog::ERROR);
			throw new RuntimeException('The GD extension for PHP is not available.');

			// @codeCoverageIgnoreEnd
		}

		// Determine which image types are supported by GD, but only once.
		if (!isset(self::$formats[IMAGETYPE_JPEG]))
		{
			$info = gd_info();
			self::$formats[IMAGETYPE_JPEG] = ($info['JPEG Support']) ? true : false;
			self::$formats[IMAGETYPE_PNG] = ($info['PNG Support']) ? true : false;
			self::$formats[IMAGETYPE_GIF] = ($info['GIF Read Support']) ? true : false;
		}

		// If the source input is a resource, set it as the image handle.
		if (is_resource($source) && (get_resource_type($source) == 'gd'))
		{
			$this->handle = &$source;
		}
		elseif (!empty($source) && is_string($source))
		{
			// If the source input is not empty, assume it is a path and populate the image handle.
			$this->loadFile($source);
		}
	}
开发者ID:realityking,项目名称:joomla-platform,代码行数:40,代码来源:image.php


示例13: image_gdVersion

	function image_gdVersion($user_ver = 0)	{
		if (! extension_loaded('gd')) { return; }
		static $gd_ver = 0;
		// Just accept the specified setting if it's 1.
		if ($user_ver == 1) { $gd_ver = 1; return 1; }
		// Use the static variable if function was called previously.
		if ($user_ver !=2 && $gd_ver > 0 ) { return $gd_ver; }
		// Use the gd_info() function if possible.
		if (function_exists('gd_info')) {
			$ver_info = gd_info();
			preg_match('/\d/', $ver_info['GD Version'], $match);
			$gd_ver = $match[0];
			return $match[0];
		}
		// If phpinfo() is disabled use a specified / fail-safe choice...
		if (preg_match('/phpinfo/', ini_get('disable_functions'))) {
			if ($user_ver == 2) {
				$gd_ver = 2;
				return 2;
			} else {
				$gd_ver = 1;
				return 1;
			}
		}
		// ...otherwise use phpinfo().
		ob_start();
		phpinfo(8);
		$info = ob_get_contents();
		ob_end_clean();
		$info = stristr($info, 'gd version');
		preg_match('/\d/', $info, $match);
		$gd_ver = $match[0];
		return $match[0];
	}
开发者ID:AuTiMoThY,项目名称:Dfocus-concord-php,代码行数:34,代码来源:vercode.php


示例14: com_install

function com_install()
{
    global $mainframe;
    jimport('joomla.filesystem.folder');
    // Initialize variables
    jimport('joomla.client.helper');
    $FTPOptions = JClientHelper::getCredentials('ftp');
    $language =& JFactory::getLanguage();
    $language->load('com_jce_imgmanager_ext', JPATH_SITE);
    $cache = $mainframe->getCfg('tmp_path');
    // Check for tmp folder
    if (!JFolder::exists($cache)) {
        // Create if does not exist
        if (!JFolder::create($cache)) {
            $mainframe->enqueueMessage(JText::_('NO CACHE DESC'), 'error');
        }
    }
    // Check if folder exists and is writable or the FTP layer is enabled
    if (JFolder::exists($cache) && (is_writable($cache) || $FTPOptions['enabled'] == 1)) {
        $mainframe->enqueueMessage(JText::_('CACHE DESC'));
    } else {
        $mainframe->enqueueMessage(JText::_('NO CACHE DESC'), 'error');
    }
    // Check for GD
    if (!function_exists('gd_info')) {
        $mainframe->enqueueMessage(JText::_('NO GD DESC'), 'error');
    } else {
        $info = gd_info();
        $mainframe->enqueueMessage(JText::_('GD DESC') . ' - ' . $info['GD Version']);
    }
}
开发者ID:Ratmir15,项目名称:Joomla---formula-of-success,代码行数:31,代码来源:install.php


示例15: loadData

 protected function loadData()
 {
     $this->vars['cms'] = substr(DB::table('system_parameters')->where('item', 'build')->pluck('value'), 1, -1);
     $this->vars['php'] = PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION . '.' . PHP_RELEASE_VERSION;
     $gd = gd_info();
     $this->vars['gd'] = substr($gd['GD Version'], 9, 3);
 }
开发者ID:mechiko,项目名称:staff-october,代码行数:7,代码来源:Version.php


示例16: getInfo

 /**
  * @return      array                    information of installed GD library
  */
 public function getInfo()
 {
     if (is_null($this->gdInfo)) {
         $this->gdInfo = gd_info();
     }
     return $this->gdInfo;
 }
开发者ID:naucon,项目名称:image,代码行数:10,代码来源:Image.php


示例17: testGD

 /**
  * Test if the GD library is available
  *
  * @return  array
  */
 protected static function testGD()
 {
     $gd = array();
     $output = '';
     $gdVersion = null;
     $gdInfo = null;
     //$GDfuncList = get_extension_funcs('gd');
     if (function_exists('gd_info')) {
         $gdInfo = gd_info();
         $gdVersion = $gdInfo['GD Version'];
     } else {
         ob_start();
         @phpinfo(INFO_MODULES);
         $output = ob_get_contents();
         ob_end_clean();
         $matches[1] = '';
         if ($output !== '') {
             if (preg_match("/GD Version[ \t]*(<[^>]+>[ \t]*)+([^<>]+)/s", $output, $matches)) {
                 $gdVersion = $matches[2];
             } else {
                 return $gd;
             }
         }
     }
     if (function_exists('imagecreatetruecolor') && function_exists('imagecreatefromjpeg')) {
         $gdVersion = isset($gdVersion) ? $gdVersion : 2;
         $gd['gd2'] = "GD: " . $gdVersion;
     } elseif (function_exists('imagecreatefromjpeg')) {
         $gdVersion = isset($gdVersion) ? $gdVersion : 1;
         $gd['gd1'] = "GD: " . $gdVersion;
     }
     return $gd;
 }
开发者ID:glauberm,项目名称:cinevi,代码行数:38,代码来源:image.php


示例18: get_gdinfo

 function get_gdinfo()
 {
     $gdinfo = array();
     $gdversion = '';
     if (function_exists("gd_info")) {
         $gdinfo = gd_info();
         preg_match("/[0-9]+\\.[0-9]+/", $gdinfo["GD Version"], $gdversiontmp);
         $gdversion = $gdversiontmp[0];
     } else {
         //next try
         ob_start();
         phpinfo(INFO_MODULES);
         $gdversion = preg_match('/GD Version.*2.0/', ob_get_contents()) ? '2.0' : '1.0';
         $gdinfo["JPG Support"] = preg_match('/JPG Support.*enabled/', ob_get_contents());
         $gdinfo["PNG Support"] = preg_match('/PNG Support.*enabled/', ob_get_contents());
         $gdinfo["GIF Create Support"] = preg_match('/GIF Create Support.*enabled/', ob_get_contents());
         $gdinfo["WBMP Support"] = preg_match('/WBMP Support.*enabled/', ob_get_contents());
         $gdinfo["XBM Support"] = preg_match('/XBM Support.*enabled/', ob_get_contents());
         ob_end_clean();
     }
     if (isset($this)) {
         $this->gdinfo = $gdinfo;
         $this->gdversion = $gdversion;
     }
     return $gdinfo;
 }
开发者ID:Kraiany,项目名称:kraiany_site_docker,代码行数:26,代码来源:gd.php


示例19: com_install

function com_install()
{
    $mainframe = JFactory::getApplication();
    jimport('joomla.filesystem.folder');
    // Initialize variables
    jimport('joomla.client.helper');
    $FTPOptions = JClientHelper::getCredentials('ftp');
    $language = JFactory::getLanguage();
    $language->load('com_jce_imgmanager_ext', JPATH_SITE);
    $cache = $mainframe->getCfg('tmp_path');
    // Check for tmp folder
    if (!JFolder::exists($cache)) {
        // Create if does not exist
        if (!JFolder::create($cache)) {
            $mainframe->enqueueMessage(WFText::_('WF_IMGMANAGER_EXT_NO_CACHE_DESC'), 'error');
        }
    }
    // Check if folder exists and is writable or the FTP layer is enabled
    if (JFolder::exists($cache) && (is_writable($cache) || $FTPOptions['enabled'] == 1)) {
        $mainframe->enqueueMessage(WFText::_('WF_IMGMANAGER_EXT_CACHE_DESC'));
    } else {
        $mainframe->enqueueMessage(WFText::_('WF_IMGMANAGER_EXT_NO_CACHE_DESC'), 'error');
    }
    // Check for GD
    if (!function_exists('gd_info')) {
        $mainframe->enqueueMessage(WFText::_('WF_IMGMANAGER_EXT_NO_GD_DESC'), 'error');
    } else {
        $info = gd_info();
        $mainframe->enqueueMessage(WFText::_('WF_IMGMANAGER_EXT_GD_DESC') . ' - ' . $info['GD Version']);
    }
    // remove wideimage folder
    if (JFolder::exists(dirname(__FILE) . '/classes/wideimage')) {
        @JFolder::delete(dirname(__FILE) . '/classes/wideimage');
    }
}
开发者ID:adjaika,项目名称:J3Base,代码行数:35,代码来源:install.php


示例20: __construct

 public function __construct()
 {
     if (gd_info()) {
         return true;
     }
     return false();
 }
开发者ID:giorgionetg,项目名称:PHimL,代码行数:7,代码来源:BaseLibrary.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP gd_version函数代码示例发布时间:2022-05-15
下一篇:
PHP gd_edit_image_support函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap