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

PHP is_blank函数代码示例

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

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



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

示例1: parseParams

 public function parseParams()
 {
     $params = array();
     if ($this->uri) {
         $params = array_values(array_filter(explode('/', $this->uri), function ($v) {
             return false == is_blank($v);
         }));
     }
     array_walk($params, function (&$v) {
         $v = rawurldecode($v);
     });
     if ($this->mapkey) {
         $segments = array_values(array_filter(explode('/:', $this->mapkey), function ($v) {
             return false == is_blank($v) and $v != '/';
         }));
         foreach ($segments as $k => $p) {
             if (isset($params[$k])) {
                 $params[$p] = $params[$k];
                 unset($params[$k]);
             } else {
                 $params[$p] = null;
             }
         }
     }
     return $params;
 }
开发者ID:undercloud,项目名称:olifant,代码行数:26,代码来源:request.php


示例2: date_strtotime

/**
 * gets Unix timestamp from date string
 * @param string $p_date A valid date/time string (see http://php.net/manual/en/datetime.formats.php)
 * @return false|int a timestamp on success, null date when $p_date is blank or false on failure.
 * @access public
 */
function date_strtotime($p_date)
{
    if (is_blank($p_date)) {
        return date_get_null();
    }
    return strtotime($p_date);
}
开发者ID:spring,项目名称:spring-website,代码行数:13,代码来源:date_api.php


示例3: email_queue_add

function email_queue_add($p_email_data)
{
    $t_email_data = email_queue_prepare_db($p_email_data);
    # email cannot be blank
    if (is_blank($t_email_data->email)) {
        error_parameters(lang_get('email'));
        trigger_error(ERROR_EMPTY_FIELD, ERROR);
    }
    # subject cannot be blank
    if (is_blank($t_email_data->subject)) {
        error_parameters(lang_get('subject'));
        trigger_error(ERROR_EMPTY_FIELD, ERROR);
    }
    # body cannot be blank
    if (is_blank($t_email_data->body)) {
        error_parameters(lang_get('body'));
        trigger_error(ERROR_EMPTY_FIELD, ERROR);
    }
    $t_email_table = config_get('mantis_email_table');
    $c_email = $t_email_data->email;
    $c_subject = $t_email_data->subject;
    $c_body = $t_email_data->body;
    $c_metadata = serialize($t_email_data->metadata);
    $query = "INSERT INTO {$t_email_table}\r\n\t\t\t\t    ( email,\r\n\t\t\t\t      subject,\r\n\t\t\t\t\t  body,\r\n\t\t\t\t\t  submitted,\r\n\t\t\t\t\t  metadata)\r\n\t\t\t\t  VALUES\r\n\t\t\t\t    ( '{$c_email}',\r\n\t\t\t\t      '{$c_subject}',\r\n\t\t\t\t      '{$c_body}',\r\n\t\t\t\t\t  " . db_now() . ",\r\n\t\t\t\t\t  '{$c_metadata}'\r\n\t\t\t\t\t)";
    db_query($query);
    return db_insert_id($t_email_table);
}
开发者ID:amjadtbssm,项目名称:website,代码行数:27,代码来源:email_queue_api.php


示例4: validate

 public function validate()
 {
     if (is_blank($this->tmp_name)) {
         $this->errors->add('파일을 선택해 주세요.');
         return false;
     }
     if (!empty($this->validate_types) && !in_array($this->type, $this->validate_types)) {
         //$this->errors->add('"' . $this->type . '"은 허용된 파일 타입이 아닙니다.');
         $this->errors->add('허용된 파일 타입이 아닙니다.');
         return false;
     }
     $names = explode('.', $this->name);
     $extension = end($names);
     if (!empty($this->validate_extensions) && !preg_grep("/{$extension}/i", $this->validate_extensions)) {
         //$this->errors->add('"' . end(explode('.', $this->name)) . '"은 허용된 파일 타입이 아닙니다.');
         $this->errors->add('허용된 파일 타입이 아닙니다.');
         return false;
     }
     if ($this->size > $this->max_upload_size) {
         $this->errors->add('최대 크기를 초과하였습니다.');
         return false;
     }
     if ($this->error > 0) {
         $this->errors->add('파일 업로드 중 오류가 발생하였습니다.');
         return false;
     }
     return true;
 }
开发者ID:utumdol,项目名称:codeseed,代码行数:28,代码来源:active_upload.class.php


示例5: custom_function_default_roadmap_print_issue

function custom_function_default_roadmap_print_issue($p_issue_id, $p_issue_level = 0)
{
    static $t_status;
    $t_bug = bug_get($p_issue_id);
    if (bug_is_resolved($p_issue_id)) {
        $t_strike_start = '<strike>';
        $t_strike_end = '</strike>';
    } else {
        $t_strike_start = $t_strike_end = '';
    }
    if ($t_bug->category_id) {
        $t_category_name = category_get_name($t_bug->category_id);
    } else {
        $t_category_name = '';
    }
    $t_category = is_blank($t_category_name) ? '' : '<b>[' . string_display_line($t_category_name) . ']</b> ';
    echo utf8_str_pad('', $p_issue_level * 6, '&#160;'), '- ', $t_strike_start, string_get_bug_view_link($p_issue_id), ': ', $t_category, string_display_line_links($t_bug->summary);
    if ($t_bug->handler_id != 0) {
        echo ' (', prepare_user_name($t_bug->handler_id), ')';
    }
    if (!isset($t_status[$t_bug->status])) {
        $t_status[$t_bug->status] = get_enum_element('status', $t_bug->status, auth_get_current_user_id(), $t_bug->project_id);
    }
    echo ' - ', $t_status[$t_bug->status], $t_strike_end, '.<br />';
}
开发者ID:nourchene-benslimane,项目名称:mantisV0,代码行数:25,代码来源:custom_function_api.php


示例6: email_queue_add

/**
 * Add to email queue
 * @param EmailData $p_email_data
 * @return int
 */
function email_queue_add($p_email_data)
{
    $t_email_data = email_queue_prepare_db($p_email_data);
    # email cannot be blank
    if (is_blank($t_email_data->email)) {
        error_parameters(lang_get('email'));
        trigger_error(ERROR_EMPTY_FIELD, ERROR);
    }
    # subject cannot be blank
    if (is_blank($t_email_data->subject)) {
        error_parameters(lang_get('subject'));
        trigger_error(ERROR_EMPTY_FIELD, ERROR);
    }
    # body cannot be blank
    if (is_blank($t_email_data->body)) {
        error_parameters(lang_get('body'));
        trigger_error(ERROR_EMPTY_FIELD, ERROR);
    }
    $t_email_table = db_get_table('email');
    $c_email = $t_email_data->email;
    $c_subject = $t_email_data->subject;
    $c_body = $t_email_data->body;
    $c_metadata = serialize($t_email_data->metadata);
    $query = "INSERT INTO {$t_email_table}\n\t\t\t\t    ( email,\n\t\t\t\t      subject,\n\t\t\t\t\t  body,\n\t\t\t\t\t  submitted,\n\t\t\t\t\t  metadata)\n\t\t\t\t  VALUES\n\t\t\t\t    ( " . db_param() . ",\n\t\t\t\t      " . db_param() . ",\n\t\t\t\t      " . db_param() . ",\n\t\t\t\t\t  " . db_param() . ",\n\t\t\t\t\t  " . db_param() . "\n\t\t\t\t\t)";
    db_query_bound($query, array($c_email, $c_subject, $c_body, db_now(), $c_metadata));
    return db_insert_id($t_email_table, 'email_id');
}
开发者ID:kaos,项目名称:mantisbt,代码行数:32,代码来源:email_queue_api.php


示例7: validate_register

 public function validate_register()
 {
     if (is_blank($this->comment)) {
         $this->errors->add('댓글을 입력해 주세요.');
         return false;
     }
     return true;
 }
开发者ID:utumdol,项目名称:codeseed,代码行数:8,代码来源:blog_comment.class.php


示例8: fill_blank_array

function fill_blank_array($mas, $str) {
	foreach ($mas as $key => $value) {
		if (is_blank($value)) {
			$mas[$key] = $str;
		}
	}
	return $mas;
}
开发者ID:Atiragram,项目名称:poit-labs,代码行数:8,代码来源:lab4.php


示例9: print_unread_icon

function print_unread_icon($p_unread = READ)
{
    $t_icon_path = config_get('icon_path');
    $t_unread_icon_arr = config_get('unread_icon_arr');
    $t_none = NONE;
    if (!is_blank($t_unread_icon_arr[$p_unread])) {
        print "<img src=\"{$t_icon_path}{$t_unread_icon_arr[$p_unread]}\" alt=\"\" />";
    } else {
        print "<img src=\"{$t_icon_path}{$t_status_icon_arr[$t_none]}\" alt=\"\" />";
    }
}
开发者ID:jin255ff,项目名称:company_website,代码行数:11,代码来源:icon_api.php


示例10: wiki_mediawiki_get_url_for_page_id

function wiki_mediawiki_get_url_for_page_id($p_page_id)
{
    $t_root_url = config_get_global('wiki_engine_url');
    $t_root_namespace = config_get('wiki_root_namespace');
    if (is_blank($t_root_namespace)) {
        $t_page_id = $p_page_id;
    } else {
        $t_page_id = $t_root_namespace . ':' . $p_page_id;
    }
    return $t_root_url . 'index.php/' . urlencode($t_page_id);
}
开发者ID:jin255ff,项目名称:company_website,代码行数:11,代码来源:wiki_mediawiki_api.php


示例11: url_repo

 public function url_repo($p_repo, $p_changeset = null)
 {
     $t_rev = '';
     $t_path = '';
     if (!is_null($p_changeset)) {
         $t_rev = '&rev=' . urlencode($p_changeset->revision);
     }
     if (!is_blank($p_repo->info['websvn_path'])) {
         $t_path = '&path=' . urlencode($p_repo->info['websvn_path']);
     }
     return $p_repo->info['websvn_url'] . 'listing.php?repname=' . urlencode($p_repo->info['websvn_name']) . "{$t_path}{$t_rev}&sc=1";
 }
开发者ID:01-Scripts,项目名称:source-integration,代码行数:12,代码来源:SourceWebSVN.php


示例12: validate_register

 public function validate_register()
 {
     if (is_blank($this->subject)) {
         $this->errors->add('제목을 입력해 주세요.');
         return false;
     }
     if (is_blank($this->content)) {
         $this->errors->add('내용을 입력해 주세요.');
         return false;
     }
     return true;
 }
开发者ID:utumdol,项目名称:codeseed,代码行数:12,代码来源:blog.class.php


示例13: log_event

/**
 * Log an event
 * @param int $p_level
 * @param string $p_msg
 * @return null
 */
function log_event($p_level, $p_msg)
{
    global $g_log_levels;
    # check to see if logging is enabled
    $t_sys_log = config_get_global('log_level');
    if (0 == ($t_sys_log & $p_level)) {
        return;
    }
    $t_now = date(config_get_global('complete_date_format'));
    $t_level = $g_log_levels[$p_level];
    $t_plugin_event = '[' . $t_level . '] ' . $p_msg;
    if (function_exists('event_signal')) {
        event_signal('EVENT_LOG', array($t_plugin_event));
    }
    $t_php_event = $t_now . ' ' . $t_level . ' ' . $p_msg;
    $t_log_destination = config_get_global('log_destination');
    if (is_blank($t_log_destination)) {
        $t_destination = '';
    } else {
        # Use @ to avoid error when there is no delimiter in log destination
        @(list($t_destination, $t_modifiers) = explode(':', $t_log_destination, 2));
    }
    switch ($t_destination) {
        case 'file':
            error_log($t_php_event . PHP_EOL, 3, $t_modifiers);
            break;
        case 'firebug':
            if (!class_exists('FirePHP')) {
                if (file_exists(BASE_PATH . DIRECTORY_SEPARATOR . 'library' . DIRECTORY_SEPARATOR . 'FirePHPCore' . DIRECTORY_SEPARATOR . 'FirePHP.class.php')) {
                    require_once BASE_PATH . DIRECTORY_SEPARATOR . 'library' . DIRECTORY_SEPARATOR . 'FirePHPCore' . DIRECTORY_SEPARATOR . 'FirePHP.class.php';
                }
            }
            if (class_exists('FirePHP')) {
                static $firephp;
                if ($firephp === null) {
                    $firephp = FirePHP::getInstance(true);
                }
                $firephp->log($t_php_event);
                return;
            }
            // if firebug is not available, fall through
        // if firebug is not available, fall through
        default:
            # use default PHP error log settings
            error_log($t_php_event . PHP_EOL);
            break;
    }
    # If running from command line, echo log event to stdout
    if (php_sapi_name() == 'cli') {
        echo $t_php_event . PHP_EOL;
    }
}
开发者ID:fur81,项目名称:zofaxiopeu,代码行数:58,代码来源:logging_api.php


示例14: getClientesCompuestosTotvs

/**
 * Trae los clientes compuestos del totvs de la base de datos SQL
 * @param bool $id
 */
function getClientesCompuestosTotvs($codigocc)
{
    $sql = "SELECT * FROM `acsa_totvs_clientes_compuestos` WHERE codigocc = '" . $codigocc . "'";
    $conn = getConnection();
    $result = executeSelect($sql, $conn);
    $clientes = array();
    if (mysql_num_rows($result) > 0) {
        while ($row = mysql_fetch_array($result)) {
            $clientes[] = array('codigocc' => trim($row['codigocc']), 'lojacc' => trim($row['lojacc']), 'codigo' => trim($row['codigo']), 'loja' => trim($row['loja']), 'nombre' => trim(is_blank(utf8_encode(stripslashes(str_replace("'", "", $row['nombre']))))));
        }
    }
    echo json_encode($clientes);
}
开发者ID:ACSAUruguay,项目名称:helpdesk,代码行数:17,代码来源:_acsa_ajax.php


示例15: mci_get_custom_field_id_from_objectref

/**
 * Get the custom field id given an object ref.  The id is set based on the following algorithm:
 * - id from objectref (if not zero).
 * - id corresponding to name in object ref.
 * - 0, if object ref doesn't contain an id or a name.
 *
 * @param ObjectRef  $p_object_ref   An associate array with "id" and "name" keys.
 */
function mci_get_custom_field_id_from_objectref($p_object_ref)
{
    if ((int) $p_object_ref['id'] != 0) {
        $t_id = (int) $p_object_ref['id'];
    } else {
        if (!is_blank($p_object_ref['name'])) {
            $t_id = custom_field_get_id_from_name($p_object_ref['name']);
        } else {
            $t_id = 0;
        }
    }
    return $t_id;
}
开发者ID:kaos,项目名称:mantisbt,代码行数:21,代码来源:mc_custom_field_api.php


示例16: mention_get_candidates

/**
 * A method that takes in a text argument and extracts all candidate @ mentions
 * from it.  The return list will not include the @ sign and will not include
 * duplicates.  This method is mainly for testability and it doesn't take into
 * consideration whether the @ mentions features is enabled or not.
 *
 * @param string $p_text The text to process.
 * @return array of @ mentions without the @ sign.
 * @private
 */
function mention_get_candidates($p_text)
{
    if (is_blank($p_text)) {
        return array();
    }
    static $s_pattern = null;
    if ($s_pattern === null) {
        $t_quoted_tag = preg_quote(mentions_tag());
        $s_pattern = '/(?:' . '(?<=^|[^\\w])' . '(?<!' . $t_quoted_tag . ')' . $t_quoted_tag . ')' . '([\\w.]*[\\w])' . '(?=[^\\w@]|$)' . '(?!$t_quoted_tag)' . '/';
    }
    preg_match_all($s_pattern, $p_text, $t_mentions);
    return array_unique($t_mentions[1]);
}
开发者ID:spring,项目名称:spring-website,代码行数:23,代码来源:mention_api.php


示例17: email_group_reminder

function email_group_reminder($p_user_id, $issues)
{
    $t_username = user_get_field($p_user_id, 'username');
    $t_email = user_get_email($p_user_id);
    $t_message = $issues;
    $t_subject = config_get('plugin_Reminder_reminder_subject');
    if (!is_blank($t_email)) {
        email_store($t_email, $t_subject, $t_message);
        if (OFF == config_get('email_send_using_cronjob')) {
            email_send_all();
        }
    }
}
开发者ID:rahmanjis,项目名称:dipstart-development,代码行数:13,代码来源:bug_feedback_mail.php


示例18: query

 function query($p_filter_input)
 {
     $invoice = $p_filter_input;
     if (is_blank($invoice)) {
         return;
     }
     plugin_push_current('CustomerManagement');
     if (access_has_global_level(plugin_config_get('view_customer_fields_threshold'))) {
         $t_query = CustomerManagementDao::buildFilterArrayForInvoice($invoice);
     }
     plugin_pop_current();
     return $t_query;
 }
开发者ID:WilfriedMartin,项目名称:customer-management,代码行数:13,代码来源:InvoiceFilter.php


示例19: check_urls

function check_urls($t_urls_in)
{
    $t_urls_in = explode("\n", $t_urls_in);
    $t_urls_out = array();
    foreach ($t_urls_in as $t_url) {
        $t_url = trim($t_url);
        if (is_blank($t_url) || in_array($t_url, $t_urls_out)) {
            continue;
        }
        $t_urls_out[] = $t_url;
    }
    return $t_urls_out;
}
开发者ID:Sansumaki,项目名称:source-integration,代码行数:13,代码来源:manage_config.php


示例20: print_version_header

function print_version_header($p_version_id)
{
    $t_project_id = version_get_field($p_version_id, 'project_id');
    $t_version_name = version_get_field($p_version_id, 'version');
    $t_project_name = project_get_field($t_project_id, 'name');
    $t_release_title = string_display($t_project_name) . ' - ' . string_display($t_version_name);
    echo $t_release_title, '<br />';
    echo str_pad('', strlen($t_release_title), '='), '<br />';
    $t_description = version_get_field($p_version_id, 'description');
    if ($t_description !== false && !is_blank($t_description)) {
        echo string_display("<br />{$t_description}<br /><br />");
    }
}
开发者ID:centaurustech,项目名称:BenFund,代码行数:13,代码来源:changelog_page.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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