This is a translated page. The original can be found here: http://iwebdevel.com/2009/08/21/phpob_start-display-page-at-once-forget-about-cookieheaders-sent-too-early-errors/
UPDATES VIA RSS | Email Uppdateringar via RSS | E-post Get updates via feedburner Get updates via twitter
Home / Coding / PHP / PHP:ob_start() Display page … Hem / Kodning / PHP / PHP: ob_start () Display sidan ...

PHP:ob_start() Display page at once, forget about cookie,headers sent too early errors PHP: ob_start () Visa sidan på en gång, glöm cookie skickade rubriker för tidigt fel

Posted on 21. Skrivet den 21. Aug, 2009 by Dragos in Coding , PHP Augusti, 2009 av Dragos i Coding, PHP

If you want to display your web pages at once, not subsequently, and reduce the “headers already sent, cannot send cookie information” errors, add ob_start() at the start of your script. Om du vill visa dina webbsidor på en gång, inte senare, och minska "headers already sent, kan inte skicka cookie-information" fel, lägg ob_start () i början av ditt manus.

This function will turn output buffering on. Denna funktion kommer att vända output buffert på. While output buffering is active no output is sent from the script (other than headers), instead the output is stored in an internal buffer. Medan produktionen buffring är aktiv inga utdata skickas från manus (andra än headers), istället produktionen lagras i en intern buffert. (php.net) (php.net)

You can also manipulate the contents of the output by using the function ob_get_contents() Du kan också manipulera innehållet i produktionen genom att använda funktionen ob_get_contents ()

Translate this post Översätta det här inlägget


Related posts: Relaterade tjänster:

  1. Browsing errors: пщщпду or пщщпдуюсщь Bläddrar fel: пщщпду eller пщщпдуюсщь
  2. PHP: How to download a webpage (aka web scrapping) with PHP PHP: Hur man laddar ner en webbsida (aka webb skrotning) med PHP
  3. Coding:How to fetch user profile data with SSI.php from a SMF forum database Coding: Hur hämta data användarprofil med SSI.php från SMF forum databas

    blog comments powered by Disqus blogg kommentarer drivs av Disqus