芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/dzilamdebravo1821.gob.mx/components/com_banners/src/Helper/BannerHelper.php
* @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Component\Banners\Site\Helper; \defined('_JEXEC') or die; /** * Banner Helper Class * * @since 1.6 */ abstract class BannerHelper { /** * Checks if a URL is an image * * @param string $url The URL path to the potential image * * @return boolean True if an image of type bmp, gif, jp(e)g, png or webp, false otherwise * * @since 1.6 */ public static function isImage($url) { $urlCheck = explode('?', $url); if (preg_match('#\.(?:bmp|gif|jpe?g|png|webp)$#i', $urlCheck[0])) { return true; } return false; } }