Jump to content
php.lv forumi

inports uz text failu


hoho

Recommended Posts

a nav sitais: header("Content-Type: application/force-download"); ?!

bet man vienalga nekas nepaliidz, izvada tekstu uz ekraana nevis genere failu.

nesaprotu .... vai sitaam funkcijaam nevajag nekaadu iipasu konfiguraaciju vai veel kaut ko?

Link to comment
Share on other sites

Tu esi mans parādnieks:

<?php
  header("Pragma: public");
  header("Expires: 0");
  header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
  header("Cache-Control: public"); 
  header("Content-Description: File Transfer");
  header("Content-Type: application/force-download");
  $header="Content-Disposition: attachment; filename=izejas_fails.txt;";
  header($header );
  header("Content-Transfer-Encoding: binary");
//   header("Content-Length: ".$len);
  echo "Jaukais txt failinsh :))";
?>

Link to comment
Share on other sites

If this header is used in a response with the application/octet- stream content-type, the implied suggestion is that the user agent should not display the response, but directly enter a `save response as...' dialog.

 

shitam vajadzeet ustraadaat:

header('Content-Type: application/octet-stream');

header("Content-Disposition: attachment; filename=\"fails.txt\"");

echo "faila fails.txt saturs";

Edited by rpr
Link to comment
Share on other sites

If this header is used in a response with the application/octet- stream content-type, the implied suggestion is that the user agent should not display the response, but directly enter a `save response as...' dialog.

 

shitam vajadzeet ustraadaat:

header('Content-Type: application/octet-stream');

header("Content-Disposition: attachment; filename=\"fails.txt\"");

echo "faila fails.txt saturs";

 

 

afigetj ... arii tas neder :( neko nesaprotu ....

Link to comment
Share on other sites

×
×
  • Create New...