ob_start is a PHP function which turns output buffering on. While output buffering is active no output is sent from the script (other than headers), instead the output is stored in an internal buffer.
Questions tagged [ob-start]
190 questions
0
votes
1 answer
ob_start crashed zip creation
if i open the zip-file, winrar says:"Unexpected end of archive"
without ob_start the zip creation works but not the download. die(); does not work

FLOTZOR
- 9
- 4
0
votes
1 answer
Get page information and not the entire page
In index.php though the name can be anything, I have an array at the very top for now, just for testing purposes.
true,
id => "KMS",
theme=>"kms_standard",
);
?>
I started this to use as information…

EasyBB
- 6,176
- 9
- 47
- 77
0
votes
1 answer
ob_start for email template?
I need to make email notification for my service Written in php. So the question is:
Is it correct to use ob_start() and ob_get_clean() or there is a better way?
Simple Example:

Maxim Pavlov
- 195
- 1
- 1
- 10
0
votes
4 answers
replace content in a page php
I have some forbidden words, than are stored in database.
the things I need to do is to replace all of them byt a new words authorized.
I did something like that
//Inclusion du fichier à parser
require_once GETCASH_BASE_PATH .…

Stanislas Piotrowski
- 2,595
- 10
- 40
- 59
0
votes
2 answers
Php UTF-8 encode
My Index
defined("DS") || define("DS", DIRECTORY_SEPARATOR);
defined("ROOT_PATH") || define("ROOT_PATH", realpath(dirname(__FILE__)));
require_once(ROOT_PATH.DS.'classes'.DS.'Helper.php');
$page = 'default';
$uri =…

Cenk
- 1
0
votes
0 answers
How to show xml on browser with output_buffering disabled
I'm trying to show a xml file in my browser, but I keep getting a headers already sent by warning by php. I'm using ob_start() and ob_flush() it helped in other situations, but in this case I still get this warning.
ob_start();
…

heliosk
- 1,113
- 3
- 23
- 45
0
votes
1 answer
ob_start() flushed automatically when PHP script ends
When I call ob_start() but not any of the end methods, the output is still being sent as if I would call ob_end_flush(). Is this always the case or does it depend on a PHP version or configuration parameter?
PHP 5.5.3

Niklas R
- 16,299
- 28
- 108
- 203
0
votes
1 answer
Ob start: Some of the data is lost
Here parts data for lost in file system/engine/controller.php.
if (file_exists(DIR_TEMPLATE . $this->template)) {
extract($this->data);
/* Here found header.tpl, media.tpl(my module),
column_left.tpl(this show my…

user3393473
- 1
- 2
0
votes
1 answer
Loading page in php
I'm working on a flight booking website. I've to make a load page with the search first, after 3 sec i want to redirect the request to another php page.
Code i tried:

Radhakrishna Rayidi
- 510
- 2
- 9
- 24
0
votes
1 answer
Shall I use output buffering (ob_start) or not
I have amended my PHP code in order to avoid using output buffering after finding out that it denotes a poor coding pattern. But still am using it where it is needed inevitably.
But, some articles say that using output buffering is beneficial as it…

sqlchild
- 8,754
- 28
- 105
- 167
0
votes
1 answer
PHP : ob + include (or) include only .. to bring in the files?
I'm making a simple MVC framework with PHP. Now i have to decide whether i should use:
(Among this methods)
ob_start();
include(....);
ob_get_contents();
Or
include(....);
Seriously which one is the standard (or what should be?) .. since i can…

夏期劇場
- 17,821
- 44
- 135
- 217
0
votes
1 answer
How capture compilation errors from an include script?
I want to include a file inside a function and using ob_start(), ob_get_contents(), etc save the output to a file.
But if there's an error in that included file, I want:
For my function to know that and capture it (so it can handle it…

Don Rhummy
- 24,730
- 42
- 175
- 330
0
votes
1 answer
Include and ob_get_clean not working properly
I have three php files: engine.php, links.php and test.php
In theory when I call _insert() function in test.php it should replace a string with the output of links.php, instead ob_start() and ob_get_clean() are ignored, and the output of links.php…

Simosito
- 11
- 2
0
votes
2 answers
Save MySQL-table to local computer
At first, I want to excuse me for my English, but I have a problem
I create a table form a database in this way:
//the connection goes right, so I don't put it into my code
Title1 | Title2 | …
---|