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
|
 |
 |
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
|
 |
 |
idh63
Posts: 76
|
| Posted: 04/05/2008, 11:35 AM |
|
Thanks for the reply Walter ;)
|
 |
 |
|