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


PHP Sanitize::safeword方法代码示例

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


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

示例1: time

                }
            }
        }
    }
    // If there are no defaults
    if (!isset($_POST['run_cycle'])) {
        $_POST['run_cycle'] = 3600;
    }
    if (!isset($_POST['date_start'])) {
        $_POST['date_start'] = time();
    }
    if (!isset($_POST['date_end'])) {
        $_POST['date_end'] = 10;
    }
    // Sanitize Values
    $_POST['title'] = Sanitize::safeword($_POST['title']);
    $_POST['method'] = Sanitize::variable($_POST['method']);
    $_POST['run_cycle'] = Sanitize::number($_POST['run_cycle'], 0);
    $_POST['date_start'] = Sanitize::number($_POST['date_start'], 0);
    $_POST['date_end'] = Sanitize::number($_POST['date_end'], 0);
    // Sanitize Parameters
    for ($a = 0; $a <= 3; $a++) {
        $_POST['args'][$a] = isset($_POST['args'][$a]) ? Sanitize::text($_POST['args'][$a]) : "";
    }
}
// Run Header
require SYS_PATH . "/controller/includes/admin_header.php";
// Get Navigation Entry
echo '
<h2 style="margin-top:20px;">' . ($editID ? 'Edit' : 'Create New') . ' Cron Task</h2>
开发者ID:SkysteedDevelopment,项目名称:Deity,代码行数:30,代码来源:custom-task.php

示例2: isset

                // Reset Values
                $_POST['handle'] = "";
                $_POST['display_name'] = "";
                $_POST['email'] = "";
                $_POST['password'] = "";
            }
        } else {
            Database::endTransaction(false);
            Alert::error("Process Error", "An error has occurred while processing this registration.", 1);
        }
    }
} else {
    $_POST['email'] = isset($_POST['email']) ? Sanitize::email($_POST['email']) : "";
    $_POST['password'] = isset($_POST['password']) ? Sanitize::safeword($_POST['password']) : "";
    $_POST['handle'] = isset($_POST['handle']) ? Sanitize::variable($_POST['handle']) : "";
    $_POST['display_name'] = isset($_POST['display_name']) ? Sanitize::safeword($_POST['display_name'], ' ') : "";
}
// Run Header
require SYS_PATH . "/controller/includes/admin_header.php";
// Display the Editing Form
echo '
<h3>Add a New User</h3>
<form class="uniform" action="/admin/AppAccount/Add User" method="post">' . Form::prepare("add-user-uni6") . '

<p>
	<strong>Profile Handle:</strong><br />
	<input type="text" name="handle" value="' . $_POST['handle'] . '" style="width:200px;" maxlength="22" />
</p>

<p>
	<strong>Profile Display Name:</strong><br />
开发者ID:SkysteedDevelopment,项目名称:Deity,代码行数:31,代码来源:Add+User.php


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