Results 1 to 3 of 3

Thread: php ob_start function

  1. #1
    Join Date
    Nov 2007
    Location
    Terengganu
    Posts
    8
    Rep Power
    0

    php ob_start function

    I've a problem when i redirect my page using header function, because after sending some data to another page, the error will appear
    -output header already sent. cant redirect..
    (too many input/output data on every page and i cant skip this step)

    so i use
    PHP Code:
    ob_start(); 
    and it seem all okey now, but the page loading become very slow.i have flush output buffering at the end of every page but the result is still same. page loading become very slow not like usual.

    is this function really have affect on page loading? I have asked this problem at another forum, but some of them told me that the usage of multiple output buffering might become a problem

    but I've take a look at php.net,

    Output buffers are stackable, that is, you may call
    PHP Code:
    ob_start() 
    while another
    PHP Code:
    ob_start() 
    is active. Just make sure that you call
    PHP Code:
    ob_end_flush() 
    the appropriate number of times. If multiple output callback functions are active, output is being filtered sequentially through each of them in nesting order.
    so, it's okey to use for many times as long i ended with clean/flush the output. anyone can share something about this ?

  2. #2
    Join Date
    Nov 2001
    Location
    Johor
    Posts
    772
    Rep Power
    230
    could you paste your code here?
    I hate when:

    vBulletin Message:
    Sorry! The administrator has specified that users can only post one message every 60 seconds

  3. #3
    Join Date
    Jun 2001
    Location
    Mystic Kingdoms
    Posts
    2,749
    Rep Power
    275
    yeah.. must see the whole code.. or related file code.
    since.. coding not only in 1 page. :P

    if i not mistake.. (sorry, i was long time away from php handcoding ) ..

    ----
    Let say index.php.. had ob_start() ,
    in that file (index.php) also had include('header.php'); and include('db.php');

    sadly.. or accidently.. in either header.php or db.php also had ob_start() .

    No wonder crash happen. That's why 'already sent'.
    and the another story is = the server configuration matter itself..

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. wedding and function shooting
    By zzrmetal in forum Advertise Your Services
    Replies: 1
    Last Post: 03-09-2007, 01:26 AM
  2. Help needed in loadMovie() function!
    By eric in forum Website Design
    Replies: 9
    Last Post: 24-05-2004, 10:34 AM
  3. print function
    By ardella in forum Website Programming
    Replies: 2
    Last Post: 13-05-2004, 12:50 AM
  4. stripslashes() function for JSP?
    By lcf in forum Website Programming
    Replies: 3
    Last Post: 21-04-2004, 10:06 PM
  5. array_splice? unset? which function is appropriate??
    By joyce in forum Website Programming
    Replies: 3
    Last Post: 17-09-2002, 02:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search Engine Optimization by vBSEO 3.5.0 RC1 PL1

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39