fwrite not working with ob_start, Any ideas?

Thread Solved

Join Date: Sep 2005
Posts: 1,075
Reputation: digital-ether is just really nice digital-ether is just really nice digital-ether is just really nice digital-ether is just really nice 
Solved Threads: 66
Moderator
digital-ether's Avatar
digital-ether digital-ether is offline Offline
Veteran Poster

Re: fwrite not working with ob_start, Any ideas?

 
0
  #11
Nov 21st, 2008
Originally Posted by rickya100 View Post
As much as I can tell it is. The file is being written when output buffering is not on. So I would assume that that means that the directory is OK.

I'm developing locally on a Mac (the folder properties show it not locked and that read & write is allowed) is there any way that could be causing a problem?

If not I'll keep working on it and if I get it I'll make sure to post up the fix.

Thanks again for the help. Really appreciate it.


Richard
Do you sure PHP is displaying errors?

The only thing I can think of is if you have an error occurring in the output buffering part of the code, and it's stopping code execution from moving on to the file writing portion.

Make sure you have error reporting on.

  1. ini_set('error_reporting', E_ALL);
  2. ini_set('display_errors', '1');

See if you get errors.

ps: a shortcut for:

  1. $data = ob_get_contents();
  2. ob_end_clean();

is
  1. $data = ob_get_clean();
www.fijiwebdesign.com - web design and development and fun
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC