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


PHP FileHelper::safeString方法代码示例

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


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

示例1: strtoupper

        $varObject->allViews[$view_count]['plural']['language'] = strtoupper($varObject->allViews[$view_count]['plural']['safe']);
        // Check plural and create
        if ($post['view-single'][$view_count]) {
            $singular = $post['view-single'][$view_count];
            // Main view can't equal the singular view
            if ($singular != $view) {
                $singular = $singular;
            } else {
                $singular = substr($view, 0, -1);
            }
        } else {
            $singular = substr($view, 0, -1);
        }
        $varObject->allViews[$view_count]['singular']['orig'] = $singular;
        $varObject->allViews[$view_count]['singular']['cap'] = ucwords($singular);
        $varObject->allViews[$view_count]['singular']['safe'] = FileHelper::safeString($singular);
        $varObject->allViews[$view_count]['singular']['language'] = strtoupper($varObject->allViews[$view_count]['singular']['safe']);
        $view_count++;
    }
}
// end - added v.0.6.0
// Language variables
$varObject->com_language = $com_language;
$varObject->com_language_menu = $com_language_menu;
$extraLanguageLines = array();
$extraSysLanguageLines = array();
// Display variables
$varObject->tab1 = $tab1;
$varObject->tab2 = $tab2;
$varObject->tab3 = $tab3;
$varObject->tab4 = $tab4;
开发者ID:calebnance,项目名称:black-rabbit-os,代码行数:31,代码来源:create.php

示例2: array

    $good = false;
}
if (empty($post['description'])) {
    $good = false;
}
// good to continue to database and create?
if ($good) {
    $varObject = (object) array();
    $varObject->return = "\n";
    $varObject->tab1 = '	';
    $varObject->tab2 = '		';
    $varObject->tab3 = '			';
    $varObject->tab4 = '				';
    $varObject->midparent = intval($post['midparent']);
    $varObject->name = FileHelper::preventInjection($post['name']);
    $varObject->filename = FileHelper::safeString($post['filename']);
    $varObject->author = FileHelper::preventInjection($post['author']);
    $varObject->author_email = FileHelper::preventInjection($post['author_email']);
    $varObject->author_url = FileHelper::preventInjection($post['author_url']);
    $varObject->version = FileHelper::onlyVersion($post['version']);
    $varObject->description = FileHelper::preventInjection($post['description']);
    $varObject->copyright = FileHelper::preventInjection($post['copyright']);
    $varObject->license = FileHelper::preventInjection($post['license']);
    $varObject->jversion = FileHelper::onlyVersion($post['jversion']);
    $varObject->brversion = FileHelper::onlyVersion($post['brversion']);
    // le Zip Array()
    $filestozip = array();
    // Lines created Array()
    $totallinescreated = array();
    // Index files
    $indexlines = array();
开发者ID:calebnance,项目名称:black-rabbit-os,代码行数:31,代码来源:module-create.php

示例3: strtolower

    if ($post['agree'] != 1) {
        $good = false;
    }
    if ($post['password'] != $post['password2']) {
        $good = false;
    }
    // if good, send e-mail and add to database
    if ($good) {
        // check if e-mail is already in use
        $noemail = 0;
        $noemail = $database->select('br_users', 'COUNT(DISTINCT email) as count', 'email="' . strtolower($post['email']) . '"', 'object');
        $noemail = $noemail[0]->count;
        if ($noemail == 0) {
            $user = array();
            $user['fname'] = ucwords(FileHelper::safeString($post['fname']));
            $user['lname'] = ucwords(FileHelper::safeString($post['lname']));
            $user['email'] = strtolower($post['email']);
            $user['email_code'] = md5(uniqid(rand(), true));
            $user['email_validated'] = 0;
            $user['password'] = FileHelper::br_encrypt($post['password']);
            $user['country'] = $post['country'];
            $user['paypal_payment_status'] = 0;
            $user['date_created'] = date('Y-m-d H:i:s');
            $database->insert('br_users', $user);
            $link_validate = $base_url . 'validate.php?' . $user['email_code'];
            // send validation e-mail
            $msg = '
			<html>
				<head>
					<title>Welcome to Black Rabbit, ' . $user['fname'] . '</title>
				</head>
开发者ID:calebnance,项目名称:black-rabbit-os,代码行数:31,代码来源:register.php


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