當前位置: 首頁>>代碼示例>>PHP>>正文


PHP validate_all_variables函數代碼示例

本文整理匯總了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');
開發者ID:01123578,項目名稱:dmi-tcat,代碼行數:31,代碼來源:mod.export_urls.php

示例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}");
}
開發者ID:pwikstrom,項目名稱:dmi-tcat,代碼行數:15,代碼來源:functions.php


注:本文中的validate_all_variables函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。