Output in real time [Emberl 1.2.0]
Hi I have a page which looks like this : Some html code [- while ( $condition ) { perl code who send informations on the output } -] Some html code - I want that the browser show the output perl code in real time to see the progress whithout a time out. If I use [+ "The output" +] or [- print "The output" -] , the entire page is shown in one time ( when all is finished ) ie no real time If I use [- print STDOUT "The output" -] , the text appears in real time but before the header and the html code : one line one line one line one line one line HTTP/1.1 200 OK Date: Fri, 28 Jan 2000 16:14:56 GMT Server: Apache/1.3.9 (Unix) mod_perl/1.21 Content-Length: 8481 Keep-Alive: timeout=15, max=40 Connection: Keep-Alive Content-Type: text/html; charset=iso-8859-1 the body html code I tried to use optEarlyHttpHeader there's no difference and I don't want to use it for all the page. How should I do ? Thanks Philippe GOBIN France Telecom HostingDirection des Développements ApplicatifsTel : 01 46 12 68 05Fax : 01.46.12.67.00Hotline : 0810 777 000Site internet : http://www.fth.net Les offres de FTH : http://extranet.fth.net
How download data/file in http [Embperl 1.2.0]
Hi I am using Emberl 1.2.0. This is the probleme : I have a form with a submit bouton to download some data ( or a file ). I want that the user can save these data. When I submit it, the header that I want to send to generate the download is printed in the page ( ...and the data too ) and after its the html part. What's wrong ? The header ? The Method ? Thanks - The result is : Content-type: application/octet-stream Content-Transfer-Encoding: binary Content-Disposition: attachment; filename="logs.txt" one lineone lineone lineone lineone lineone lineone lineone lineone lineone lineone lineone lineone lineone lineone line etc... ...and the html part The file "this_file.epl" : [- if ( $fdat{'export'} ) {print "Content-type: application/octet-stream\n";print "Content-Transfer-Encoding: binary\n";print "Content-Disposition: attachment; filename=\"logs.txt\"\r\n\r\n";while ($cpt<30) { print "one line"; $cpt++; } } -] bla bla Philippe GOBIN France Telecom HostingDirection des Développements ApplicatifsTel : 01 46 12 68 05Fax : 01.46.12.67.00Hotline : 0810 777 000Site internet : http://www.fth.net Les offres de FTH : http://extranet.fth.net