Здравствуйте,
есть такой код:
Код: <?php
header("Content-type: text/text; charset=windows-1251");
include "../.config.mysql";
$str = "";
$select_product = mysql_query("SELECT `id`, `barcode` FROM `product` ORDER BY `id` ASC");
while($product = mysql_fetch_object($select_product)) {$str .= $product->id .";". $product->barcode ."\n";}
header("Content-Length: ". strlen($str));
header('Content-Disposition: attachment; filename="listls.csv"');
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private", false);
header("Content-Description: File Transfer");
header("Content-Transfer-Encoding: ascii");
echo $str;
exit;
?>
есть такой код:
Код: <?php
header("Content-type: text/text; charset=windows-1251");
include "../.config.mysql";
$str = "";
$select_product = mysql_query("SELECT `id`, `barcode` FROM `product` ORDER BY `id` ASC");
while($product = mysql_fetch_object($select_product)) {$str .= $product->id .";". $product->barcode ."\n";}
header("Content-Length: ". strlen($str));
header('Content-Disposition: attachment; filename="listls.csv"');
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private", false);
header("Content-Description: File Transfer");
header("Content-Transfer-Encoding: ascii");
echo $str;
exit;
?>