本文整理汇总了PHP中validate_all_variables函数的典型用法代码示例。如果您正苦于以下问题:PHP validate_all_variables函数的具体用法?PHP validate_all_variables怎么用?PHP validate_all_variables使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了validate_all_variables函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: validate_all_variables
<link rel="stylesheet" href="css/main.css" type="text/css" />
<script type="text/javascript" language="javascript">
</script>
</head>
<body>
<h1>TCAT :: Export URLs</h1>
<?php
validate_all_variables();
$filename = get_filename_for_export('urlsExport');
$csv = new CSV($filename, $outputformat);
$csv->writeheader(array('tweet_id', 'url', 'url_expanded', 'url_followed'));
$sql = "SELECT t.id as id, u.url as url, u.url_expanded as url_expanded, u.url_followed as url_followed FROM " . $esc['mysql']['dataset'] . "_tweets t, " . $esc['mysql']['dataset'] . "_urls u ";
$sql .= sqlSubset();
$sql .= " AND u.tweet_id = t.id ORDER BY id";
$sqlresults = mysql_unbuffered_query($sql);
$out = "";
if ($sqlresults) {
while ($data = mysql_fetch_assoc($sqlresults)) {
$csv->newrow();
$csv->addfield($data['id'], 'integer');
$csv->addfield($data['url'], 'string');
if (isset($data['url_followed']) && strlen($data['url_followed']) > 1) {
$csv->addfield($data['url'], 'string');
示例2: get_file
function get_file($what)
{
validate_all_variables();
// get filename (this also validates the data)
global $database;
$filename = get_filename_for_export($what);
generate($what, $filename);
// redirect to file
$location = str_replace("index.php", "", ANALYSIS_URL) . filename_to_url($filename);
if (defined('LOCATION')) {
$location = LOCATION . $location;
}
header("Content-type: text/csv");
header("Location: {$location}");
}