View Single Post
Join Date: Mar 2008
Posts: 78
Reputation: rickya100 is an unknown quantity at this point 
Solved Threads: 1
rickya100 rickya100 is offline Offline
Junior Poster in Training

Re: fwrite not working with ob_start, Any ideas?

 
0
  #5
Nov 21st, 2008
Hi Rhyan and kkeith29.

Thanks for the replies. kkeith yes I am overwriting $to_write just as a temporary troubleshooting aid.

Rhyan I tried changing the code to this (The old code is commented out to let you know whats changed):

  1. ob_start(); // start buffer
  2. include ('../php_includes/sidebar_search_flight.php');
  3. //$flight = ob_get_contents(); // assign buffer contents to variable
  4. //ob_end_clean(); // end buffer and remove buffer contents
  5. $flight = ob_get_flush();

However this doesn't work as the included file is output as content and displayed in the browser window and th ejavascript file is not created.

I'm going to try and put the content held int he include file directly in the code and escape every quote I need to and I'll see if that works, but if you have any other ideas please let me know as i really want to keep the content separated and not have to escape everything.

Many thanks,

Richard

EDIT; there are no PHP errors being output either. using the first code is is just a blank page (which is good as I will be using it with a CRON job) or with the modified code the include file is output.
Last edited by rickya100; Nov 21st, 2008 at 5:47 am. Reason: Forgot some information
Reply With Quote