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

PHP isUrl函数代码示例

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

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



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

示例1: getPreview

 /**
  * Gets the preview for a video
  * @param string $id YouTube ID or url
  * @return string
  * @uses getId()
  */
 public static function getPreview($id)
 {
     if (isUrl($id)) {
         $id = self::getId($id);
     }
     return sprintf('http://img.youtube.com/vi/%s/0.jpg', $id);
 }
开发者ID:mirko-pagliai,项目名称:me-tools,代码行数:13,代码来源:Youtube.php


示例2: cleanVar

function cleanVar($var)
{
    if (!isUrl($var)) {
        $var = "NONE";
    }
    return $var;
}
开发者ID:JhetoX,项目名称:URLRandomShortener,代码行数:7,代码来源:api.php


示例3: setUrl

 private function setUrl()
 {
     if (!isUrl($this->input['url'])) {
         $this->errorOutput(strtoupper('illegal_url'));
     }
     $this->url = trim($this->input['url']);
 }
开发者ID:h3len,项目名称:Project,代码行数:7,代码来源:CustomUpdate.php


示例4: setUrl

 private function setUrl()
 {
     if (!isUrl("http://" . $this->input['url']) && !isUrl("https://" . $this->input['url'])) {
         $this->errorOutput(strtoupper('illegal_url'));
     }
     $this->url = trim($this->input['url']);
     $this->ip = gethostbyname($this->input['url']);
 }
开发者ID:h3len,项目名称:Project,代码行数:8,代码来源:SiteUpdate.php


示例5: url

 public function url(string $url = '') : Ajax
 {
     // Veri bir url içermiyorsa siteUrl yöntemi ile url'ye dönüştürülür.
     if (!isUrl($url)) {
         $url = siteUrl($url);
     }
     $this->sets['url'] = "\turl:\"{$url}\"," . EOL;
     return $this;
 }
开发者ID:znframework,项目名称:znframework,代码行数:9,代码来源:Ajax.php


示例6: _render

 /**
  * Internal function to render a thumbnail
  * @param string $target Target file
  * @return \Cake\Network\Response|null|void
  */
 protected function _render($target)
 {
     if (isUrl($target)) {
         return $this->redirect($target);
     }
     $this->autoRender = false;
     //Renders the thumbnail
     header(sprintf('Content-type: %s', mime_content_type($target)));
     readfile($target);
     exit;
 }
开发者ID:mirko-pagliai,项目名称:thumbs,代码行数:16,代码来源:ThumbsController.php


示例7: url

 public function url($url = '')
 {
     if (!is_string($url)) {
         Error::set(lang('Error', 'stringParameter', '1.(url)'));
         return $this;
     }
     // Veri bir url içermiyorsa siteUrl yöntemi ile url'ye dönüştürülür.
     if (!isUrl($url)) {
         $url = siteUrl($url);
     }
     $this->sets['url'] = "\turl:\"{$url}\"," . eol();
     return $this;
 }
开发者ID:Allopa,项目名称:ZN-Framework-Starter,代码行数:13,代码来源:JQAjax.php


示例8: smarty_function_include_file

/**
 * Includes a file in template. Handy for adding html files to tpl files
 *
 * @param array $Params The parameters passed into the function.
 * The parameters that can be passed to this function are as follows.
 * - <b>name</b>: The name of the file.
 * @param Smarty $Smarty The smarty object rendering the template.
 * @return string The rendered asset.
 */
function smarty_function_include_file($Params, &$Smarty)
{
    $Name = ltrim(val('name', $Params), '/');
    if (strpos($Name, '..') !== false) {
        return '<!-- Error, moving up directory path not allowed -->';
    }
    if (isUrl($Name)) {
        return '<!-- Error, urls are not allowed -->';
    }
    $filename = rtrim($Smarty->template_dir, '/') . '/' . $Name;
    if (!file_exists($filename)) {
        return '<!-- Error, file does not exist -->';
    }
    return file_get_contents($filename);
}
开发者ID:caidongyun,项目名称:vanilla,代码行数:24,代码来源:function.include_file.php


示例9: do

 public function do(string $email = NULL, string $returnLinkPath = NULL) : bool
 {
     $email = Properties::$parameters['email'] ?? $email;
     $returnLinkPath = Properties::$parameters['returnLink'] ?? $returnLinkPath;
     Properties::$parameters = [];
     // ------------------------------------------------------------------------------
     // Settings
     // ------------------------------------------------------------------------------
     $tableName = INDIVIDUALSTRUCTURES_USER_CONFIG['matching']['table'];
     $senderInfo = INDIVIDUALSTRUCTURES_USER_CONFIG['emailSenderInfo'];
     $getColumns = INDIVIDUALSTRUCTURES_USER_CONFIG['matching']['columns'];
     $usernameColumn = $getColumns['username'];
     $passwordColumn = $getColumns['password'];
     $emailColumn = $getColumns['email'];
     // ------------------------------------------------------------------------------
     if (!empty($emailColumn)) {
         DB::where($emailColumn, $email);
     } else {
         DB::where($usernameColumn, $email);
     }
     $row = DB::get($tableName)->row();
     if (isset($row->{$usernameColumn})) {
         if (!isUrl($returnLinkPath)) {
             $returnLinkPath = siteUrl($returnLinkPath);
         }
         $encodeType = INDIVIDUALSTRUCTURES_USER_CONFIG['encode'];
         $newPassword = Encode::create(10);
         $encodePassword = !empty($encodeType) ? Encode::type($newPassword, $encodeType) : $newPassword;
         $templateData = array('usernameColumn' => $row->{$usernameColumn}, 'newPassword' => $newPassword, 'returnLinkPath' => $returnLinkPath);
         $message = Import::template('UserEmail/ForgotPassword', $templateData, true);
         Email::sender($senderInfo['mail'], $senderInfo['name'])->receiver($email, $email)->subject(lang('IndividualStructures', 'user:newYourPassword'))->content($message);
         if (Email::send()) {
             if (!empty($emailColumn)) {
                 DB::where($emailColumn, $email);
             } else {
                 DB::where($usernameColumn, $email);
             }
             if (DB::update($tableName, [$passwordColumn => $encodePassword])) {
                 return $this->success = lang('IndividualStructures', 'user:forgotPasswordSuccess');
             }
             return !($this->error = lang('Database', 'updateError'));
         } else {
             return !($this->error = lang('IndividualStructures', 'user:emailError'));
         }
     } else {
         return !($this->error = lang('IndividualStructures', 'user:forgotPasswordError'));
     }
 }
开发者ID:znframework,项目名称:znframework,代码行数:48,代码来源:ForgotPassword.php


示例10: _getPreview

 /**
  * Gets the image preview (virtual field)
  * @return string|null
  * @uses MeTools\Utility\Youtube::getId()
  * @uses MeTools\Utility\Youtube::getPreview()
  */
 protected function _getPreview()
 {
     if (empty($this->_properties['text'])) {
         return null;
     }
     //Checks for the first image in the text
     preg_match('#<\\s*img [^\\>]*src\\s*=\\s*(["\'])(.*?)\\1#im', $this->_properties['text'], $matches);
     if (!empty($matches[2])) {
         return Router::url($matches[2], true);
     }
     //Checks for a YouTube video and its preview
     preg_match('/\\[youtube](.+?)\\[\\/youtube]/', $this->_properties['text'], $matches);
     if (!empty($matches[1])) {
         return Youtube::getPreview(isUrl($matches[1]) ? Youtube::getId($matches[1]) : $matches[1]);
     }
     return null;
 }
开发者ID:mirko-pagliai,项目名称:me-cms,代码行数:23,代码来源:Page.php


示例11: redirect

function redirect(string $url, int $time = 0, array $data = [], bool $exit = true)
{
    if (!isUrl($url)) {
        $url = siteUrl($url);
    }
    if (!empty($data)) {
        foreach ($data as $k => $v) {
            Session::insert('redirect:' . $k, $v);
        }
    }
    if ($time > 0) {
        sleep($time);
    }
    header("Location: {$url}", true);
    if ($exit === true) {
        exit;
    }
}
开发者ID:znframework,项目名称:znframework,代码行数:18,代码来源:Redirect.php


示例12: __construct

 /**
  * Construct.
  * It sets the origin file.
  *
  * If the origin is relative, it will be relative to  `APP/webroot/img`.
  * @param string $origin Origin file
  * @return \Thumbs\Utility\ThumbCreator
  * @throws InternalErrorException
  * @uses $height
  * @uses $origin
  * @uses $width
  * @uses _downloadTemporary()
  */
 public function __construct($origin)
 {
     //If the origin is a remote file, downloads as temporary file
     if (isUrl($origin)) {
         $origin = $this->_downloadTemporary($origin);
         //If it's a local file, can be relative to `APP/webroot/img/`
     } elseif (!Folder::isAbsolute($origin)) {
         $origin = WWW_ROOT . 'img' . DS . $origin;
     }
     //Checks if is readable
     if (!is_readable($origin)) {
         throw new NotFoundException(__d('thumbs', 'File or directory {0} not readable', $origin));
     }
     //Checks if has a valid extension
     if (!in_array(extension($origin), ['gif', 'jpg', 'jpeg', 'png'])) {
         throw new InternalErrorException(__d('thumbs', 'The file {0} is not an image', $origin));
     }
     //Sets path, width and height of the origin file
     $this->origin = $origin;
     $this->width = getimagesize($origin)[0];
     $this->height = getimagesize($origin)[1];
     return $this;
 }
开发者ID:mirko-pagliai,项目名称:thumbs,代码行数:36,代码来源:ThumbCreator.php


示例13: use

 public function use(...$styles)
 {
     $str = '';
     $eol = EOL;
     $args = $this->_parameters($styles, 'styles');
     $lastParam = $args->lastParam;
     $arguments = $args->arguments;
     $links = $args->cdnLinks;
     foreach ($arguments as $style) {
         if (is_array($style)) {
             $style = '';
         }
         $styleFile = STYLES_DIR . suffix($style, ".css");
         if (!is_file($styleFile)) {
             $styleFile = EXTERNAL_STYLES_DIR . suffix($style, ".css");
         }
         if (!in_array("style_" . $style, Properties::$isImport)) {
             if (is_file($styleFile)) {
                 $str .= '<link href="' . baseUrl($styleFile) . '" rel="stylesheet" type="text/css" />' . $eol;
             } elseif (isUrl($style) && extension($style) === 'css') {
                 $str .= '<link href="' . $style . '" rel="stylesheet" type="text/css" />' . $eol;
             } elseif (isset($links[strtolower($style)])) {
                 $str .= '<link href="' . $links[strtolower($style)] . '" rel="stylesheet" type="text/css" />' . $eol;
             }
             Properties::$isImport[] = "style_" . $style;
         }
     }
     if (!empty($str)) {
         if ($lastParam === true) {
             return $str;
         } else {
             echo $str;
         }
     } else {
         return false;
     }
 }
开发者ID:znframework,项目名称:znframework,代码行数:37,代码来源:Style.php


示例14: use

 public function use(...$scripts)
 {
     $str = '';
     $eol = EOL;
     $args = $this->_parameters($scripts, 'scripts');
     $lastParam = $args->lastParam;
     $arguments = $args->arguments;
     $links = $args->cdnLinks;
     foreach ($arguments as $script) {
         if (is_array($script)) {
             $script = '';
         }
         $scriptFile = SCRIPTS_DIR . suffix($script, ".js");
         if (!is_file($scriptFile)) {
             $scriptFile = EXTERNAL_SCRIPTS_DIR . suffix($script, ".js");
         }
         if (!in_array("script_" . $script, Properties::$isImport)) {
             if (is_file($scriptFile)) {
                 $str .= '<script type="text/javascript" src="' . baseUrl($scriptFile) . '"></script>' . $eol;
             } elseif (isUrl($script) && extension($script) === 'js') {
                 $str .= '<script type="text/javascript" src="' . $script . '"></script>' . $eol;
             } elseif (isset($links[strtolower($script)])) {
                 $str .= '<script type="text/javascript" src="' . $links[strtolower($script)] . '"></script>' . $eol;
             }
             Properties::$isImport[] = "script_" . $script;
         }
     }
     if (!empty($str)) {
         if ($lastParam === true) {
             return $str;
         } else {
             echo $str;
         }
     } else {
         return false;
     }
 }
开发者ID:znframework,项目名称:znframework,代码行数:37,代码来源:Script.php


示例15: renderMaster

 /**
  *
  */
 public function renderMaster()
 {
     // Build the master view if necessary
     if (in_array($this->_DeliveryType, array(DELIVERY_TYPE_ALL))) {
         $this->MasterView = $this->masterView();
         // Only get css & ui components if this is NOT a syndication request
         if ($this->SyndicationMethod == SYNDICATION_NONE && is_object($this->Head)) {
             $CssAnchors = AssetModel::getAnchors();
             $this->EventArguments['CssFiles'] =& $this->_CssFiles;
             $this->fireEvent('BeforeAddCss');
             $ETag = AssetModel::eTag();
             $CombineAssets = c('Garden.CombineAssets');
             $ThemeType = isMobile() ? 'mobile' : 'desktop';
             // And now search for/add all css files.
             foreach ($this->_CssFiles as $CssInfo) {
                 $CssFile = $CssInfo['FileName'];
                 if (!array_key_exists('Options', $CssInfo) || !is_array($CssInfo['Options'])) {
                     $CssInfo['Options'] = array();
                 }
                 $Options =& $CssInfo['Options'];
                 // style.css and admin.css deserve some custom processing.
                 if (in_array($CssFile, $CssAnchors)) {
                     if (!$CombineAssets) {
                         // Grab all of the css files from the asset model.
                         $AssetModel = new AssetModel();
                         $CssFiles = $AssetModel->getCssFiles($ThemeType, ucfirst(substr($CssFile, 0, -4)), $ETag);
                         foreach ($CssFiles as $Info) {
                             $this->Head->addCss($Info[1], 'all', true, $CssInfo);
                         }
                     } else {
                         $Basename = substr($CssFile, 0, -4);
                         $this->Head->addCss(url("/asset/css/{$ThemeType}/{$Basename}-{$ETag}.css", '//'), 'all', false, $CssInfo['Options']);
                     }
                     continue;
                 }
                 $AppFolder = $CssInfo['AppFolder'];
                 $LookupFolder = !empty($AppFolder) ? $AppFolder : $this->ApplicationFolder;
                 $Search = AssetModel::CssPath($CssFile, $LookupFolder, $ThemeType);
                 if (!$Search) {
                     continue;
                 }
                 list($Path, $UrlPath) = $Search;
                 if (isUrl($Path)) {
                     $this->Head->AddCss($Path, 'all', val('AddVersion', $Options, true), $Options);
                     continue;
                 } else {
                     // Check to see if there is a CSS cacher.
                     $CssCacher = Gdn::factory('CssCacher');
                     if (!is_null($CssCacher)) {
                         $Path = $CssCacher->get($Path, $AppFolder);
                     }
                     if ($Path !== false) {
                         $Path = substr($Path, strlen(PATH_ROOT));
                         $Path = str_replace(DS, '/', $Path);
                         $this->Head->addCss($Path, 'all', true, $Options);
                     }
                 }
             }
             // Add a custom js file.
             if (arrayHasValue($this->_CssFiles, 'style.css')) {
                 $this->addJsFile('custom.js');
                 // only to non-admin pages.
             }
             $Cdns = array();
             if (!c('Garden.Cdns.Disable', false)) {
                 $Cdns = array('jquery.js' => "//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js");
             }
             // And now search for/add all JS files.
             $this->EventArguments['Cdns'] =& $Cdns;
             $this->fireEvent('AfterJsCdns');
             $this->Head->addScript('', 'text/javascript', false, array('content' => $this->definitionList(false)));
             foreach ($this->_JsFiles as $Index => $JsInfo) {
                 $JsFile = $JsInfo['FileName'];
                 if (!is_array($JsInfo['Options'])) {
                     $JsInfo['Options'] = array();
                 }
                 $Options =& $JsInfo['Options'];
                 if (isset($Cdns[$JsFile])) {
                     $JsFile = $Cdns[$JsFile];
                 }
                 $AppFolder = $JsInfo['AppFolder'];
                 $LookupFolder = !empty($AppFolder) ? $AppFolder : $this->ApplicationFolder;
                 $Search = AssetModel::JsPath($JsFile, $LookupFolder, $ThemeType);
                 if (!$Search) {
                     continue;
                 }
                 list($Path, $UrlPath) = $Search;
                 if ($Path !== false) {
                     $AddVersion = true;
                     if (!isUrl($Path)) {
                         $Path = substr($Path, strlen(PATH_ROOT));
                         $Path = str_replace(DS, '/', $Path);
                         $AddVersion = val('AddVersion', $Options, true);
                     }
                     $this->Head->addScript($Path, 'text/javascript', $AddVersion, $Options);
                     continue;
                 }
//.........这里部分代码省略.........
开发者ID:battaglia01,项目名称:vanilla,代码行数:101,代码来源:class.controller.php


示例16: externalUrl

 /**
  * Build a URL to an external site linked to this one.
  *
  * This function is used when an external site is configured with Vanilla in an embedding scenario.
  *
  * @param string $path The path within Vanilla.
  * @return string Returns the external URL.
  */
 function externalUrl($path)
 {
     $urlFormat = c('Garden.ExternalUrlFormat');
     if ($urlFormat && !isUrl($path)) {
         $result = sprintf($urlFormat, ltrim($path, '/'));
     } elseif (stringBeginsWith($path, '//')) {
         $result = Gdn::request()->scheme() . ':' . $path;
     } else {
         $result = Url($path, true);
     }
     return $result;
 }
开发者ID:sitexa,项目名称:vanilla,代码行数:20,代码来源:functions.general.php


示例17: setCalculatedFields

 /**
  * Set fields that need additional manipulation after retrieval.
  *
  * @param $User
  * @throws Exception
  */
 public function setCalculatedFields(&$User)
 {
     if ($v = val('Attributes', $User)) {
         if (is_string($v)) {
             setValue('Attributes', $User, @unserialize($v));
         }
     }
     if ($v = val('Permissions', $User)) {
         if (is_string($v)) {
             setValue('Permissions', $User, @unserialize($v));
         }
     }
     if ($v = val('Preferences', $User)) {
         if (is_string($v)) {
             setValue('Preferences', $User, @unserialize($v));
         }
     }
     if ($v = val('Photo', $User)) {
         if (!isUrl($v)) {
             $PhotoUrl = Gdn_Upload::url(changeBasename($v, 'n%s'));
         } else {
             $PhotoUrl = $v;
         }
         setValue('PhotoUrl', $User, $PhotoUrl);
     }
     if ($v = val('AllIPAddresses', $User)) {
         if (is_string($v)) {
             $IPAddresses = explode(',', $v);
             foreach ($IPAddresses as $i => $IPAddress) {
                 $IPAddresses[$i] = ForceIPv4($IPAddress);
             }
             setValue('AllIPAddresses', $User, $IPAddresses);
         }
     }
     setValue('_CssClass', $User, '');
     if ($v = val('Banned', $User)) {
         setValue('_CssClass', $User, 'Banned');
     }
     $this->EventArguments['User'] =& $User;
     $this->fireEvent('SetCalculatedFields');
 }
开发者ID:RodSloan,项目名称:vanilla,代码行数:47,代码来源:class.usermodel.php


示例18: connect


//.........这里部分代码省略.........
         return $this->render();
     }
     $UserModel = Gdn::userModel();
     // Check to see if there is an existing user associated with the information above.
     $Auth = $UserModel->getAuthentication($this->Form->getFormValue('UniqueID'), $this->Form->getFormValue('Provider'));
     $UserID = val('UserID', $Auth);
     // Check to synchronise roles upon connecting.
     if (($this->data('Trusted') || c('Garden.SSO.SyncRoles')) && $this->Form->getFormValue('Roles', null) !== null) {
         $SaveRoles = $SaveRolesRegister = true;
         // Translate the role names to IDs.
         $Roles = $this->Form->getFormValue('Roles', null);
         $Roles = RoleModel::getByName($Roles);
         $RoleIDs = array_keys($Roles);
         if (empty($RoleIDs)) {
             // The user must have at least one role. This protects that.
             $RoleIDs = $this->UserModel->newUserRoleIDs();
         }
         if (c('Garden.SSO.SyncRolesBehavior') === 'register') {
             $SaveRoles = false;
         }
         $this->Form->setFormValue('RoleID', $RoleIDs);
     } else {
         $SaveRoles = false;
         $SaveRolesRegister = false;
     }
     if ($UserID) {
         // The user is already connected.
         $this->Form->setFormValue('UserID', $UserID);
         if (c('Garden.Registration.ConnectSynchronize', true)) {
             $User = Gdn::userModel()->getID($UserID, DATASET_TYPE_ARRAY);
             $Data = $this->Form->formValues();
             // Don't overwrite the user photo if the user uploaded a new one.
             $Photo = val('Photo', $User);
             if (!val('Photo', $Data) || $Photo && !isUrl($Photo)) {
                 unset($Data['Photo']);
             }
             // Synchronize the user's data.
             $UserModel->save($Data, array('NoConfirmEmail' => true, 'FixUnique' => true, 'SaveRoles' => $SaveRoles));
         }
         // Always save the attributes because they may contain authorization information.
         if ($Attributes = $this->Form->getFormValue('Attributes')) {
             $UserModel->saveAttribute($UserID, $Attributes);
         }
         // Sign the user in.
         Gdn::session()->start($UserID, true, (bool) $this->Form->getFormValue('RememberMe', true));
         Gdn::userModel()->fireEvent('AfterSignIn');
         //         $this->_setRedirect(TRUE);
         $this->_setRedirect($this->Request->get('display') == 'popup');
     } elseif ($this->Form->getFormValue('Name') || $this->Form->getFormValue('Email')) {
         $NameUnique = c('Garden.Registration.NameUnique', true);
         $EmailUnique = c('Garden.Registration.EmailUnique', true);
         $AutoConnect = c('Garden.Registration.AutoConnect');
         if ($IsPostBack && $this->Form->getFormValue('ConnectName')) {
             $searchName = $this->Form->getFormValue('ConnectName');
         } else {
             $searchName = $this->Form->getFormValue('Name');
         }
         // Get the existing users that match the name or email of the connection.
         $Search = false;
         if ($searchName && $NameUnique) {
             $UserModel->SQL->orWhere('Name', $searchName);
             $Search = true;
         }
         if ($this->Form->getFormValue('Email') && ($EmailUnique || $AutoConnect)) {
             $UserModel->SQL->orWhere('Email', $this->Form->getFormValue('Email'));
             $Search = true;
开发者ID:korelstar,项目名称:vanilla,代码行数:67,代码来源:class.entrycontroller.php


示例19: json_decode

 include "getProjectsFromJSON.php";
 if (!empty($projectArray)) {
     for ($i = 0; $i < sizeof($projectArray); $i++) {
         if ($projectArray[$i]->{'UUID'} == $UUID) {
             $selectedProject = $projectArray[$i];
             $allowedFilesArray = json_decode($selectedProject->{$property});
             if (isset($options) && $options != null) {
                 if ($options == "option") {
                     for ($j = 0; $j < sizeof($allowedFilesArray); $j++) {
                         $currentFile = $allowedFilesArray[$j];
                         $length = strlen($currentFile);
                         if ($length > 30) {
                             $currentFile = substr($allowedFilesArray[$j], 0, 20) . "..." . substr($allowedFilesArray[$j], $length - 9, $length);
                         }
                         include_once "functions.php";
                         if (file_exists("../executables/" . $allowedFilesArray[$j]) || isUrl($allowedFilesArray[$j])) {
                             echo '<option id="' . rawurldecode($allowedFilesArray[$j]) . '">' . $currentFile . "</option>";
                         }
                     }
                 } elseif ($options == "image") {
                     $directory = "../images/screenshots/";
                     for ($j = 0; $j < sizeof($allowedFilesArray); $j++) {
                         if (file_exists($directory . $allowedFilesArray[$j])) {
                             echo '<a href="' . $directory . rawurlencode($allowedFilesArray[$j]) . '" data-lightbox="' . $directory . rawurlencode($allowedFilesArray[$j]) . '">' . '<div class="entry-icon medium container space">' . '<div class="entry-icon" style="background-image: url(' . $directory . rawurlencode($allowedFilesArray[$j]) . ');"> </div>	' . '</div>' . '</a>';
                         }
                     }
                 }
             }
             break;
         }
     }
开发者ID:DeadSpaghetti,项目名称:codera,代码行数:31,代码来源:printAllAvailableOptions.php


示例20: IsUrl

$RemotePhoto = IsUrl($this->User->Photo, 0, 7);
// Define the current profile picture
$Picture = '';
if ($this->User->Photo != '') {
    if (IsUrl($this->User->Photo)) {
        $Picture = img($this->User->Photo, array('class' => 'ProfilePhotoLarge'));
    } else {
        $Picture = img(Gdn_Upload::url(changeBasename($this->User->Photo, 'p%s')), array('class' => 'ProfilePhotoLarge'));
    }
}
// Define the current thumbnail icon
$Thumbnail = $this->User->Photo;
if (!$Thumbnail && function_exists('UserPhotoDefaultUrl')) {
    $Thumbnail = UserPhotoDefaultUrl($this->User);
}
if ($Thumbnail && !isUrl($Thumbnail)) {
    $Thumbnail = Gdn_Upload::url(changeBasename($Thumbnail, 'n%s'));
}
$Thumbnail = img($Thumbnail, array('alt' => t('Thumbnail')));
?>
<div class="SmallPopup FormTitleWrapper">
    <h1 class="H"><?php 
echo $this->data('Title');
?>
</h1>
    <?php 
echo $this->Form->open(array('enctype' => 'multipart/form-data'));
echo $this->Form->errors();
?>
    <ul>
        <?php 
开发者ID:karanjitsingh,项目名称:iecse-forum,代码行数:31,代码来源:picture.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP isUser函数代码示例发布时间:2022-05-15
下一篇:
PHP isUnderRoot函数代码示例发布时间: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