CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Outputting a batch file

Print topic Send  topic

Author Message
idh63

Posts: 76
Posted: 04/04/2008, 1:11 PM

hi,

I did some searching here for answers to processing batch files in CSS.

I have written a script to create a payment processor batch payment file.

I have a grid that displays the pending payments.
I have a button at the bottom called Process.

I am using the client side on click to build the batch file.

The script is working fine but i have:
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\admin\withdrawal_requests_events.php:57) in <b>C:\xampp\htdocs\admin\withdrawal_requests.php</b> on line <b>803</b><br />
at the end of my download.

This is because i am using echo:
$results = implode("\n", $ebullion_file);
// Send header

header('Content-disposition: attachment; filename=' . date('ymd') . 'ebullion.txt'); header("Content-type: application/x-www-form-urlencoded");

// Echo results
echo $results;

What's the trick here so i don't get the mesage at the bottom of my batch txt file?

Thanks
View profile  Send private message
wkempees


Posts: 1679
Posted: 04/05/2008, 8:14 AM

Solution: Do not use the echo.

Study filehandling in PhP
do a proper : file create, open, write, close

search also for 'ob_start'

Walter

_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message
idh63

Posts: 76
Posted: 04/05/2008, 11:35 AM

Thanks for the reply Walter ;)
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.