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
-1
votes
1 answer
How to make ob_start() working with curl?
I have the following methods in my class:
public function __construct(){
$this->handle = curl_init();
}
public function setOptArrayAndExecute(){
$curlArray = curl_setopt_array(
$this->handle,
array(
…

user2853437
- 750
- 8
- 27
-1
votes
2 answers
Use ob_start and ob_end_flush to include CSS in a global file
I have a globals.php file included in every file on my site. I'd like to include on this file a CSS file globals.css.
The problem is that if I add the CSS in globals.php and then include it on all file, I get some errors like:
Warning:…

Perocat
- 1,481
- 7
- 25
- 48
-2
votes
2 answers
PHP PDOStatement::execute(): SQLSTATE[HY093]
Warning: PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter number: parameter was not defined in C:\xamppp\htdocs\porto\yonetim\network\islem.php on line 14
I GET AN ERROR
Project Source:…

ZexGG
- 1
-2
votes
1 answer
php - Not showing the output from ob_start();
I am trying to run a PHP script in the background after getting the 200 respond from apache, however, it is not working, am facing a little problem with the following code and I am not sure…

Deen Doughouz
- 1
- 6
-2
votes
1 answer
php buffering with ob_start: synchronous alternative
Hy community
I have some troubles with php and could not find a solution. I am currently developing a wordpress plugin, and what I would like to do is to manipulate some content. Using php buffering (ob_start) which works fine, but gives me some new…

Reto Stauffer
- 89
- 10
-2
votes
5 answers
Image not showing ob_start()
Couldn’t find anything on the webs so here is the issue: I have a cropper tool and I want to show the cropped image on this page. But because my functions.php has a function that uses a header method, I had to use ob_start in my file. That causes…

Kraishan
- 443
- 5
- 14
- 38
-2
votes
2 answers
ob_start() breaks somehow php
I've got an HTML file that looks like this called login.php
-2
votes
2 answers
What method should I use for later set a variable and then echo the page title
I'm trying to avoid to query my database twice: for set attribute and also for echo the page title. I want to query it just one time:
Example:

Mihai Matei
- 24,166
- 5
- 32
- 50
-2
votes
1 answer
php - ob_start / fputs suddenly doesn't work anymore, is there anything that can stop it?
My code:
function log_this($to_log, $prepend = null){
ob_start();
$fn = '../info.log';
$fp = fopen($fn, 'a');
fputs($fp, "\r\rnew log -------- \r\r");
if(isset($prepend)) fputs($fp, $prepend . ":\r\r");
…

Luca Reghellin
- 7,426
- 12
- 73
- 118