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 CẬP NHẬT VIA RSS | Email Get updates via feedburner Get updates via twitter
Home / Coding / PHP / PHP:ob_start() Display page … Trang chủ / Coding / PHP / PHP: ob_start () hiển thị trang ...

PHP:ob_start() Display page at once, forget about cookie,headers sent too early errors PHP: ob_start () hiển thị trang cùng một lúc, quên đi cookie, tiêu đề đã gửi lỗi quá sớm

Posted on 21. Được đăng trên 21. Aug, 2009 by Dragos in Coding , PHP Tháng Tám, 2009 của Dragos tạ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. Nếu bạn muốn hiển thị các trang web của bạn cùng một lúc, sau đó không, và giảm tiêu đề "đã được gửi, không có thể gửi thông tin cookie" lỗi, thêm ob_start () ở đầu kịch bản của bạn.

This function will turn output buffering on. Chức năng này sẽ lần lượt xuất đệm trên. While output buffering is active no output is sent from the script (other than headers), instead the output is stored in an internal buffer. Trong khi sản lượng đầu ra đệm là hoạt động không được gửi từ các tập lệnh (khác với các tiêu đề), thay vì sản lượng này được lưu giữ trong một bộ đệm nội bộ. (php.net) (php.net)

You can also manipulate the contents of the output by using the function ob_get_contents() Bạn cũng có thể thao tác các nội dung của các đầu ra bằng cách sử dụng chức năng ob_get_contents ()

Translate this post Dịch bài đăng này


Related posts: Liên quan đến bài viết:

  1. Browsing errors: пщщпду or пщщпдуюсщь Đang duyệt lỗi: пщщпду hoặc пщщпдуюсщь
  2. PHP: How to download a webpage (aka web scrapping) with PHP PHP: Làm thế nào để tải một trang web (aka web scrapping) với PHP
  3. Coding:How to fetch user profile data with SSI.php from a SMF forum database Coding: Làm thế nào để lấy dữ liệu hồ sơ người dùng với SSI.php từ một cơ sở dữ liệu diễn đàn SMF

    blog comments powered by Disqus blog ý kiến được hỗ trợ bởi are On