function exporter() { $current_url = $_SERVER['REQUEST_URI']; $min_link = explode('/', $current_url); //$cons = mysql_real_escape_string($_GET['ec']); //$type = mysql_real_escape_string($_GET['t']); $cons = $_GET['ec']; $type = $_GET['t']; if (is_numeric($cons) && $cons > 0) { //$filename = $min_link[1].'_comments_'.$cons; $filename = 'comments_' . $cons; if ($type == 'xls') { get_comments_xls($filename, $cons); } if ($type == 'json') { get_comments_json($cons); } if ($type == 'xml') { get_comments_xml($filename, $cons); } } }
<?php $current_url = $_SERVER['REQUEST_URI']; $min_link = explode('/', $current_url); $cons = mysql_real_escape_string($_GET['ec']); $type = mysql_real_escape_string($_GET['t']); if (is_numeric($cons) && $cons > 0) { $filename = $min_link[1] . '_comments_' . $cons; if ($type == 'xls') { get_comments_xls($filename, $cons); } }