hoho Posted January 24, 2007 Report Share Posted January 24, 2007 paliidziet luudzu ar skriptu - nospiežot uz pogas, sisteema generee text failu un piedaava to vai nu sagabaat vai atvert. nekur uz servera nevajag saglabaat failu. Link to comment Share on other sites More sharing options...
ok1 Posted January 24, 2007 Report Share Posted January 24, 2007 Padarbojies ar Headeriem Link to comment Share on other sites More sharing options...
andrisp Posted January 24, 2007 Report Share Posted January 24, 2007 Pievērs uzmanību tieši komentāriem - tur ir dažādi veidi kā, piemēram, ģenerēt PDF. Izpēti un pielāgo parastu text failu ģenerēšanai. Link to comment Share on other sites More sharing options...
hoho Posted January 24, 2007 Author Report Share Posted January 24, 2007 visi piemeeri ir taadi, ka fails jau ir saglabaats uz servera, bet kaa uztaisiits ja failu nevajag nekur sagalabaat tikai uzgenereet ar noteiktu informaaciju?! :S Link to comment Share on other sites More sharing options...
rpr Posted January 24, 2007 Report Share Posted January 24, 2007 header("Content-Disposition: attachment; filename=\"fails.txt\""); echo "faila fails.txt saturs"; Link to comment Share on other sites More sharing options...
hoho Posted January 24, 2007 Author Report Share Posted January 24, 2007 hmm .... man vienkarsi izvada "faila fails.txt saturs" uz ekraana nevis genere teksta failu ... Link to comment Share on other sites More sharing options...
4e4en Posted January 24, 2007 Report Share Posted January 24, 2007 aizmirso header('Content-Type: application/octet-stream'); vai ari bija header('Content-Type: octet/stream'); Link to comment Share on other sites More sharing options...
hoho Posted January 24, 2007 Author Report Share Posted January 24, 2007 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 More sharing options...
andrisp Posted January 24, 2007 Report Share Posted January 24, 2007 Parādi, ko jau esi sarakstījis. PS. to force-download nevajag. Link to comment Share on other sites More sharing options...
ok1 Posted January 24, 2007 Report Share Posted January 24, 2007 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 More sharing options...
rpr Posted January 24, 2007 Report Share Posted January 24, 2007 sakains brouzeris, ja nenjem veeraa hederus. vispaar ok1 tu pats zini, ko puse no tiem hederiem noziimee? http://www.w3.org/Protocols/rfc2616/rfc261....html#sec19.5.1 Link to comment Share on other sites More sharing options...
hoho Posted January 24, 2007 Author Report Share Posted January 24, 2007 hmmm...............nu arii tagad "Jaukais txt failinsh :))" izvada kaa tekstu un viss .... :( :( :( tosh nevajag kaut kaadu konfiguraaciju paarbaudiit?! :S Link to comment Share on other sites More sharing options...
rpr Posted January 24, 2007 Report Share Posted January 24, 2007 (edited) 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 January 24, 2007 by rpr Link to comment Share on other sites More sharing options...
hoho Posted January 24, 2007 Author Report Share Posted January 24, 2007 es jau izmeeginaaju gan IE, gan FF, nekur nestraada :( Link to comment Share on other sites More sharing options...
hoho Posted January 24, 2007 Author Report Share Posted January 24, 2007 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 More sharing options...
Recommended Posts