473,756 Members | 6,970 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Re: output buffering, parse error unexpected t_string

On Sep 26, 3:23*pm, Captain Paralytic <paul_laut...@y ahoo.comwrote:
On 26 Sep, 22:54, JRough <jlro...@yahoo. comwrote:
On Sep 26, 2:26*pm, Captain Paralytic <paul_laut...@y ahoo.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=\"$CHAR SET\"' );
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:2 4) in /home/allrail/
public_html/templates/menu.php.html on line 33

-----tr function----
function MakeTR($menu_id ,$menu_name){
$span_id = $menu_name.$men u_id;
$div_id = "menu".$menu_id ;
return "<tr>
<td>
<div class='menuOut' id='".$div_id." ' onclick=\"Switc hMenu('"..
$span_id."')\" onclick=\"Chang eClass('".$div_ id."','menuOut' )\">
<div id='imgSep'>
<img src='".$SETTING['siteurl']."images/transparent.gif '
width='10' height='10'></div>".strtouppe r($menu_name)." </div>
<span class='submenu' id='".$span_id. "'>";
}
Sep 26 '08 #1
0 1804

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

Similar topics

2
2887
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 process_card($card_details) { // connect to payment gateway or // use gpg to encrypt and mail or // store in DB if you really want to
5
13173
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') VALUES ('$_POST', '$_POST', '$_POST') mysql_query($sql)"; When I view the code in Internet Explorer I get the following error message: Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or...
4
22159
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 if(isset($_GET)) { echo "<div id="visible">"; echo "<span onclick="swapform()">Log In Form</span>"; echo "</div>"; echo "<div id="theform" style="visibility: hidden">";
36
8007
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 shortcomings will soon become apparent. I am developing an estimating construction system, using PHP5 and MySQL 5.0.24a with Ubuntu. I have a main "projects" file, and 2 detail files, one for piping and one for equipment. Each of these files will have...
3
2399
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 help?
2
3227
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", $formName); // 06-22-07 - the next commands try to import all the functions that the
3
5597
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 what's the actual problem here..? my code
11
2936
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: attachment; header("Pragma: no-cache"); header("Expires; 0"); print "$header\n$data";
10
5666
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 $subject_set = get_all_subjects(); while ($subject = mysql_fetch_array($subject_set)) { echo "<li>{$subject}</li>"; $page_set = get_pages_for_subject($subject);
0
9487
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9735
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7285
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6556
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5324
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3828
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3395
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2697
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.