473,320 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Re: output buffering, parse error unexpected t_string

On Sep 26, 3:23*pm, Captain Paralytic <paul_laut...@yahoo.comwrote:
On 26 Sep, 22:54, JRough <jlro...@yahoo.comwrote:
On Sep 26, 2:26*pm, Captain Paralytic <paul_laut...@yahoo.comwrote:
On 26 Sep, 22:20, JRough <jlro...@yahoo.comwrote:
I'm trying to use output buffering to cheat so i can *print to excel
which is called later than this header().
* * * * header("Content-type: application/xmsdownload");
* * * * header("Content-Disposition: attachment;
* * * * header("Pragma: no-cache");
* * * * header("Expires; 0");
* * * * print "$header\n$data";
This is the header line it conflicts with so I surrounded it with the
buffer.
ob_start()
header( 'Content-type: text/html; charset=\"$CHARSET\"' );
obj_end_flush()
exit;
I have a question is this buffer supposed to go around the whole php
page or only the offending header line?
I am getting an error message on the header line " Parse error: syntax
error, unexpected T_STRING in /home/allrail/public_html/header.php on
line 39"
It worked before I put the buffer around it?
thanks,
you have forgotton the semi-colons!
okay, thanks, but I still have an error. *Now it is on the preceeding
line 40.
It says obj_end_flush() is an undefined function.
"Fatal error: Call to undefined function obj_end_flush() in /home/
allrail/public_html/header.php on line 40"
How can I fix that?

Don't you think it's time that you realised that programming is not
your forte? You simply don't have the attention to detail or the
intelligence to carry it off.
without the exit I get this again:
Warning: Cannot modify header information - headers already sent by
(output started at /home/allrail/public_html/header.php:40) in /home/
allrail/public_html/header.php on line 39
as well as this:
Fatal error: Cannot redeclare maketr() (previously declared in /home/
allrail/public_html/templates/menu.php.html:24) in /home/allrail/
public_html/templates/menu.php.html on line 33

-----tr function----
function MakeTR($menu_id,$menu_name){
$span_id = $menu_name.$menu_id;
$div_id = "menu".$menu_id;
return "<tr>
<td>
<div class='menuOut' id='".$div_id."' onclick=\"SwitchMenu('"..
$span_id."')\" onclick=\"ChangeClass('".$div_id."','menuOut')\">
<div id='imgSep'>
<img src='".$SETTING['siteurl']."images/transparent.gif'
width='10' height='10'></div>".strtoupper($menu_name)."</div>
<span class='submenu' id='".$span_id."'>";
}
Sep 26 '08 #1
0 1784

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Salim | last post by:
Hi people, keep getting this errorParse error: parse error, unexpected T_STRING in order_fns.php line 91. the code is below for the file and I've indicated line 91 <?php function...
5
by: Anna MZ | last post by:
I am new to php and have written the following mysql code to enter the details of a new user in the admin subdomain of my website: $sql = "INSERT INTO 'users' ('userid', 'username', 'upassword')...
4
kestrel
by: kestrel | last post by:
I have some html code that is supposed to be displayed by php echo. But for some reason i keep getting a syntax error, and i cant figure out what is going on. Heres what i have <?php...
36
by: rhys | last post by:
My Gurus and Angels -- Please pardon this old-school programmer, only recently enlightened to open-source, having been trapped in the convenience of proprietary lingos for way too long. My...
3
by: sclarkstone | last post by:
Im getting this error; Parse error: syntax error, unexpected T_STRING, expecting ':' or ';' with this line; header ('postcodesearch.php?e=nw&pcode=',); I cant find whats wrong, can anyone...
2
by: Lawrence Krubner | last post by:
Imagine a template system that works by getting a file, as a string, and then putting it through eval(), something like this: $formAsString = $controller->command("readFileAndReturnString",...
3
paulrajj
by: paulrajj | last post by:
hi to all, i am getting syntax error on my code.. Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in D:\xampp\htdocs\Dummy\paulraj\matrim\exam.php on line 62 ...
11
by: JRough | last post by:
I'm trying to use output buffering to cheat so i can print to excel which is called later than this header(). header("Content-type: application/xmsdownload"); header("Content-Disposition:...
10
by: benicio | last post by:
Parse error: syntax error, unexpected T_STRING, expecting '(' in C:\wamp\www\study_group\includes\functions.php on line 19 I got this error and this syntax is from 8 to 19th line. <?php ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.