Questions tagged [ob-start]

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.

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…
-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…
-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: <html> <head> <?php // how should I use here ob_start() ? Is there any other possible way…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/php" class="post-tag grid--cell" title="show questions tagged 'php'" rel="tag">php</a> <a href="../../questions/tagged/variables" class="post-tag grid--cell" title="show questions tagged 'variables'" rel="tag">variables</a> <a href="../../questions/tagged/ob-start" class="post-tag grid--cell" title="show questions tagged 'ob-start'" rel="tag">ob-start</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Dec 05 '12 at 13:25">asked Dec 05 '12 at 13:25</time> <a href="../../users/1545088/mihai-matei" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/1545088.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Mihai Matei" /> </a> <div class="s-user-card--info"> <a href="../../users/1545088/mihai-matei" class="s-user-card--link">Mihai Matei</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">24,166</li> <li class="s-award-bling s-award-bling__gold" title="5 gold badges">5</li> <li class="s-award-bling s-award-bling__silver" title="32 silver badges">32</li> <li class="s-award-bling s-award-bling__bronze" title="50 bronze badges">50</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-12234896"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>-2</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/12234896/php-ob-start-fputs-suddenly-doesn-t-work-anymore-is-there-anything-that-can-st" class="question-hyperlink">php - ob_start / fputs suddenly doesn't work anymore, is there anything that can stop it?</a></h3> <div class="excerpt">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"); …</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/php" class="post-tag grid--cell" title="show questions tagged 'php'" rel="tag">php</a> <a href="../../questions/tagged/ob-start" class="post-tag grid--cell" title="show questions tagged 'ob-start'" rel="tag">ob-start</a> <a href="../../questions/tagged/fputs" class="post-tag grid--cell" title="show questions tagged 'fputs'" rel="tag">fputs</a> <a href="../../questions/tagged/ob-get-contents" class="post-tag grid--cell" title="show questions tagged 'ob-get-contents'" rel="tag">ob-get-contents</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Sep 02 '12 at 09:40">asked Sep 02 '12 at 09:40</time> <a href="../../users/551357/luca-reghellin" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/551357.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Luca Reghellin" /> </a> <div class="s-user-card--info"> <a href="../../users/551357/luca-reghellin" class="s-user-card--link">Luca Reghellin</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">7,426</li> <li class="s-award-bling s-award-bling__gold" title="12 gold badges">12</li> <li class="s-award-bling s-award-bling__silver" title="73 silver badges">73</li> <li class="s-award-bling s-award-bling__bronze" title="118 bronze badges">118</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-45936157"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>-3</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>3</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/45936157/why-the-php-output-is-not-displaying-on-webpage" class="question-hyperlink">Why the PHP output is not displaying on webpage?</a></h3> <div class="excerpt">I am not getting any output from this php code shows blank page <?php include 'conn.php'; ?> <!DOCTYPE html> <html lang="en"> <head> <?php include('callheadcss.php');?> </head> <body> Div to show php Output <div id="slidey"> <ul> <?php working…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/php" class="post-tag grid--cell" title="show questions tagged 'php'" rel="tag">php</a> <a href="../../questions/tagged/prepared-statement" class="post-tag grid--cell" title="show questions tagged 'prepared-statement'" rel="tag">prepared-statement</a> <a href="../../questions/tagged/ob-start" class="post-tag grid--cell" title="show questions tagged 'ob-start'" rel="tag">ob-start</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Aug 29 '17 at 10:01">asked Aug 29 '17 at 10:01</time> <a href="../../users/8001214/krish" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/8001214.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="krish" /> </a> <div class="s-user-card--info"> <a href="../../users/8001214/krish" class="s-user-card--link">krish</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">120</li> <li class="s-award-bling s-award-bling__bronze" title="14 bronze badges">14</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="s-pagination pager fr"> <a class="s-pagination--item" href="../../questions/tagged/ob-start_page=12" rel="prev" title="Go to page 12">Prev </a> <a class="s-pagination--item" href="../../questions/tagged/ob-start_page=1" rel="" title="Go to page 1">1</a> <a class="s-pagination--item" href="../../questions/tagged/ob-start_page=2" rel="" title="Go to page 2">2</a> <a class="s-pagination--item" href="../../questions/tagged/ob-start_page=3" rel="" title="Go to page 3">3</a> <div class="s-pagination--item s-pagination--item__clear">…</div> <a class="s-pagination--item" href="../../questions/tagged/ob-start_page=12" rel="" title="Go to page 12">12</a> <div class="s-pagination--item is-selected">13</div> </div> </div> </div> </div> </div> <script src="../../static/js/stack-icons.js"></script> <script src="../../static/js/fromnow.js"></script> </body> </html>