Ob_get_clean. 2 with no alternative. Ob_get_clean

 
2 with no alternativeOb_get_clean Output a string to the browser before the script has finished running: <?php

For example: use function OutputControl\ob_start; use function OutputControl\ob_end_flush; use function OutputControl\ob_get_clean; ob_start (); echo "Hello, world. David thanks for your response. The output buffer must be started by ob_start () with PHP_OUTPUT_HANDLER_FLUSHABLE flag. I was trying to debug my code using error_log() and I discovered that ob_get_clean() also truncates the error_log() buffer right in the middle of its output, and well as the output buffer which it is supposed to truncate. So you save a line or two of code. Am on a shared server. It executes both ob_get_contents () and ob_end_clean () functions. Definition and Usage. What is the benefit of passing a callback to ob_start compared to just processing the result of ob_get_clean()? 0. Otherwise ob_clean () will not work. ob_get_length — Return the length of the output buffer. ob_end_clean (): bool. ob_start (); $ attributes = shortcode_atts (array ( 'id' = > 'value', ), $ atts); // your desired code return ob_get_clean. I am working on a CSS and JS compiler and need to find a way to list the contents of wp_head() I am trying to get a list of all CSS/JS files and inline CSS on any give page. Im novice so i dont understand what this doing. A callback function can be passed in to do processing on the contents of the buffer before it gets flushed from the buffer. The short answer is that yes, you have to turn on output buffering before you can use ob_clean. log (ab_id_transakce); return empty variable because there is in php ob_get_clean (). If you say this in PHP: echo 'Hello'; it will result in the string Hello being sent to the browser more or less immediately. That's related to how the. Starts the output buffer, any output placed after this will be captured and not displayed: ob_get_contents() Returns all content captured by ob_start() ob_end_clean() Empties the output buffer and turns it off for the current nesting level: ob_get_clean() Triggers both ob_get_contents() and ob_end_clean() ob_get_level() ob_flush — Flush (send) the output buffer. I am including HTML template in my shortcode by using ob_start & ob_get_clean. 2k 11 11 gold badges 115 115 silver badges 109 109 bronze badges. 3. ob_start () use. Otherwise this function will not work. this won't work because output buffer is sent to the browser. The output buffer, on the other hand, will catch all output that takes place after ob_start() including (HTML) output of any warnings or errors you might have in the code before you call ob_get_contents();. ob_clean () Also be aware that nothing is already being flushed with functions like echo, print_r, etc. If you want to further process the buffer's contents you have to call ob_get_contents () before ob_flush () as the buffer contents are discarded after ob_flush () is called. Enabling output buffering decreases the download time it takes and renders the HTML in the browser. Connect and share knowledge within a single location that is structured and easy to search. Tiện ích lọc. It executes both ob_get_contents () and ob_end_clean () functions. Probably you are using a buffering function in output buffering callback which isn't possible as mentioned in php ob_start output_callback documentation. Output a string to the browser before the script has finished running: <?php. Should you wish to use the output from the included file, you should use op_get_contents() , which will return a string of the contents of the buffer. W3Schools offers free online tutorials, references and exercises in all the major languages of the web. First, you can't call a PHP page like that using include_once - the query string will be ignored. ob_get_clean does two things: it gets the contents of the buffer as a string, and it cleans out the buffer. Two problems. The output may be caught by another output buffer, or, if there are no other output buffers, sent directly to the browser. When the component writes it's output directly to the stream you need to code to accommodate that behavior unless you want to rewrite the. Well, you shouldn't even be able to do ob_clean(); before ob_start(). ob_get_clean () essentially executes both ob_get_contents () and ob_end_clean () . 4. Send content immediately to the browser on every statement which produces output: <?php. ob_get_flush — Flush the output buffer, return it as a string and turn off output buffering. Hi, we were using html_output() to get all the tags generated by the SEO Framework 4. When I opened the file in notepad, I could see it was just the raw html. ini settings to reflect that. Output Control 함수 목록. Ver también. Now, let say that output buffer contains a character "a" and headers are not yet sent. Follow answered Mar 1, 2011 at 23:25. 0. ob_get_clean () is a function that gets the current output buffer contents and deletes it. 1. patch This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. See answer from @Marc to, ob_get_clean() is the short variant of ob_get_contents(); ob_clean();. Try using output buffer like this : ob_start (); // your includes echo ob_get_clean (); Use this in all of your includes, and you will not get any errors. 3. In this case, since the 2 statements follow each other, you're not intercepting anything at all. If your theme is not displaying your shortcodes, probabily you output the content of the post without let Wordpress filter it. Improve this answer. The output may be caught by another output buffer or, if there are no other output buffers, sent directly to the browser. Description ¶. 1. Description ¶. Gets the current buffer contents and delete current output buffer. 2. Actually, we can use type regulation - intval (ob_get_contents ()), for cheking On/Off output buffering, but it lays the possible problems in the future. Also, regardless of the use or warnings related to ob_clean, I'm still seeing the notices make their way through to the response, so a check won't affect the results. php is just echoed. I'm trying to use the get_the_content() function but instead of pulling the contents of the custom post type I've created it's pulling the contents of the page the shortcode is sitting on. Learn how to use the ob_get_clean () function in PHP, an in-built function that cleans or deletes the current output buffer and returns the output buffering again. Obtiene el contenido del búfer actual y elimina el búfer de salida actual. Q&A for work. function test_shortcodes () { return 'Shortcodes are working!'; } add_shortcode ('test_shortcodes', 'test_shortcodes'); I have. You have to give the id to report. I read brenns10 comment's at this link. Description. 2. The ob_start () function is a useful tool for buffering your output in your PHP web application. Conclusion. While output buffering is active no output is sent from the script (other than headers), instead the output is stored in an internal buffer. 3. If this function returns more than 0 you are still inside a buffer. // Turn on implicit flushing. get_the_title() and get_the_post_thumbnail(). The central point of my comment is that it is not possible - based on that you appear to preclude output buffering in your original post. ob_get_flush ( ): string|false. ob_clean (): bool. I'm facing a weird problem when using the Elementor Wordpress Page Builder. The PHP ob_get_clean() function returns the contents of the current output buffer and then deletes this output buffer. output_compression to 0 or Off; 3) setting Apache variables such as "no-gzip" either through apache_setenv () or through entries in . Je n'ai pas trouvé de solution a mon problème j'ai remplacé comme vous me l'avez dis HOOK_HOME_SECONDARY_LEFT, et ce dans différents fichiers. ob_srtart begins output buffering. 1. . ob_clean() This function removes what is stored in the output buffer. Tôi có 1 ví dụ đơn giản như sau: New search experience powered by AI. So why in manual these functions are under control PHP_OUTPUT_HANDLER_CLEANABLE const? I'm confused about using flags in. ob_get_clean() — Similarly, this will be the combination of ob_get_contents() and ob_end_flush(). So ob_start() is supposed to capture output until another buffer function is called like ob_get_clean(), ob_get_contents(), ob_get_flush(). Thanks for contributing an answer to Stack Overflow! Please be sure to answer the question. The output may be caught by another output buffer or, if there are no other output buffers, sent directly to the browser. When the. I must say i discovered that the problem is something between the two scripts (server_status and ranking) and not with ranking. – r3wt. 1 the document fed to dompdf would be pre-processed using PHP's eval() function when DOMPDF_ENABLE_PHP was set to true. Everything works normally but the returned HTML structure is broken. Other functions are all working fine e. . Unfortunately, my webhost doesn't have output_buffering. I'd expect a notice that the buffer wasn't started with the proper PHP_OUTPUT_HANDLER_CLEANABLE flag as per the docs. What is the ob_get_length() Function? The ob_get_length() function is a PHP built-in function that allows you to get the length of the output buffer. 2) $bild="images/newimage2. kub. For example: buffer is empty; echo 'hello' - output buffer has "hello" stringIn this article, we will take an in-depth look at the ob_get_length() function and its usage. It shows in the top all the time but I have read some about ob_start(); and trying to use it but the shortcode just returns nothing. PHP ob_end_clean does not clear buffer. Parameters. I am using ob_get_contents() to create a html file from php file. Here are the functions you could use: ob_get_clean. ob_get_flush() — This functions creates combinatorial effects of both ob_get_contents() and ob_end_flush(). (The ordering is important: ob_flush() flushes PHP's buffers, flush() then tells Apache to flush it too. If you want to capture instead of echoing, you should use ob_get_clean () – kijin. Neither discarding the buffer's contents (ob_clean() ob_end_clean(), ob_get_clean()) nor retrieving the current buffer contents (ob_get_contents(), ob_get_clean()) invoke the output callback. Viewed 2k times. Note : The output buffer must be started by ob_start() with PHP_OUTPUT_HANDLER_CLEANABLE and PHP_OUTPUT_HANDLER_REMOVABLE flags. It works. ob_end_clean(). ob_get_clean(): Three Birds, One Stone. If you are using error_log(), use ob_get_contents() and ob_end_clean() instead of ob_get_clean(). Manual says: "The function will be called when ob_end_flush () is called, or when the output buffer is flushed to the browser at the end of the request. ob_get_length — Return the length of the output buffer. Let's say i have a file consisting of 5 lines of text and every line has 50 chars. Is it po. i dont know how you can get the gd2 resource into an object you can pass to Response::make. ob_get_clean ( ): string|false. ob_start () use. ob_flush. 6. oh my god @Paul Norman. My searches on SO brought me solutions like@GentlemanMax Yes, regarding both. I'm having some trouble because anything I do in the function called by the action hook is always echoed out at the top of the shortcode instead of inside the shortcode where it belongs. It just executes the code without any feedback. Both approaches therefore may become unreliable - in particular when switching between development setups and/or production servers. I think in this case they mean the same thing. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more. But let's suppose you can, is the first thing that happens in this class always an ajax request? If not, then you still haven't initiated ob_start(). If multiple output callback functions are active, output is being filtered sequentially through each of them in nesting order. Shortcodes have to return their. File: smarty_internal_cacheresource_file. 3. 2 with no alternative. ob_get_flush() Returns the current buffer contents, output it immediately, then clean it out. ob_get_clean () básicamente ejecuta ob_get_contents () y ob_end_clean () . WordPress uses get_ for returning almost any function inside the loop without echoing out to the browser. The code is sorta lik. Using ob_gzhandler and manually echo'ing the buffer. Enough already with the “get_the_content()” jabber. it will work as you would use ob_start with no. On development machine sometimes it works but on the test machine it did not work. Syntax. 1 Answer Sorted by: 9 This will return the same as your example given : ob_start (); echo 'custom code'; echo 'another line of custom code'; echo 'more code'; return. I'm trying to find a catch-all filter that gives me one last crack at modifying the final markup in its entirety before output. gif";. If you want to use it for a larger buffer you have to edit your php. ob_flush does not work on my server. I was trying to debug my code using error_log() and I discovered that ob_get_clean() also truncates the error_log() buffer right in the middle of its output, and well as the output buffer which it is supposed to truncate. However, casting to number should ignore regular leading spaces. g. If I vardump() the result of the Artisan::call method it just. So, until browsers begin to show buffered content. Follow answered Feb 10, 2017 at 4:10. There are couple of other ob_ functions for more flexibility. php. 3. Using the ob_get_level() function is straightforward. typo, undefined variable, etc. Here we are using three function ob_start() will start output buffer and ob_end_clean() will clean the output of buffer and ob_get_contents will give you output as string which is echoed till now. I understand that you should not want to handle this kind of errors in your own code since it has to be clean & tested but still you might get some, e. log (ab_id_transakce); return empty variable because there is in php ob_get_clean (). Its output is rendered to the buffer. The output may be caught by another output buffer or, if there are no other output buffers, sent directly to the browser. By understanding the syntax and usage of the function, you can easily start output buffering and modify your output before sending it to the client. We can take the previous example to learn how to subsequent buffers into a stack. The function will be called when the output buffer is flushed (sent) or cleaned (with ob_flush (), ob_clean () or similar function) or when the output buffer is flushed to. The function will be called when the output buffer is flushed (sent) or cleaned (with ob_flush(), ob_clean() or similar function) or when the output buffer is flushed to the browser at the. ob_get_clean() essentially executes both ob_get_contents() and ob_end_clean(). The output buffer must be started by ob_start with PHP_OUTPUT_HANDLER_CLEANABLE and PHP_OUTPUT_HANDLER_REMOVABLE flags. But it looks like the DOMPDF library doesn't work whit big pages. ob_get_clean — Get current buffer contents and delete current output buffer. Cette fonction vide le tampon de sortie sans l'envoyer au navigateur. Tiện ích lọc dữ liệu: Bạn có thể sử dụng ob_start để lọc. There are two ways that I can think of at this moment. Description ¶. flush () may not be able to override the buffering scheme of your web server and it has no effect on any client-side buffering in the browser. ob_end_clean (): bool. Return Value: Returns a string containing the contents of the buffer: PHP. Si fuera necesario continuar procesando el contenido del búfer, se ha de llamar a ob_get_contents () antes que a ob_end_clean (), ya que el contenido del búfer es desechado cuando se llama a ob_end_clean () . Understanding ob_start() function in php. April 3, 2012. Once output has started, the only way to redirect is through JavaScript, you cannot use PHP. ob_clean () Also be aware that nothing is already being flushed with functions like echo, print_r, etc. A callback function can be passed in to do processing on the contents of the buffer before it gets flushed from the buffer. */ //If you do the same again. imagejpeg outputs an image. The ob_start() code worked perfectly. corvidmemory. ob_get_length() Get the size of the buffer, in bytes. Yes it's exiting before reaching to ob_get_clean. PHP prior. I'm making my first plugin and I have a problem with displaying my shortcode. ob_get_length — Return the length of the output buffer. Removing ob_start() and echo ob_get_clean() returns the same result on the admin page. ob_get_clean — Get current buffer contents and delete current output buffer. 2. console. basically, I have products displayed on a page using a while loop, each containing an 'id' based on the product id, when this button gets pressed, I use an iframe to call a script that adds the ID to an array, that array is then accessed in the basket script, which prints all items in an SQL database where the ID matches the numbers in the. The ob_get_clean() function returns the contents of the output buffer and then deletes the contents from the buffer. I'm generating a ton of XML that is to be passed to an API as a post variable when a user click on a form button. Gets the current buffer contents and delete current output buffer. This function discards the contents of the output buffer. Best you can do is:. The ob_get_contents() function is a built-in function in PHP that allows you to get . Example shortcodes:I found ob_start() and ob_get_clean() in php manual to achieve this. Thank you very much for your help. We use ob_end_clean() with ob_get_contents() which first gets the contents as a string and then the output buffer is cleaned and turned off, this clears the global stack and keeps the whole content in a variable to be processed. 1. It is the same as the following statement, which might be better to understand: "If ob_get_level () returns a 'truthy' value (is not 0 but. djjjozsi, thank you for your attempt but your code just echoed the ranking. This is fine in contexts where you're outputting stuff directly, but sometimes you want to use that workflow, but capture the output instead of sending it to the browser. The ob_flush () function outputs the contents of the topmost output buffer and then clears the buffer of the contents. According to the manual,. The ob_get_contents () function has different return behaivor in PHP 5. Advantages of output buffering for Web developers. 참고 See also header() and setcookie() . 3. echo str_pad ("Hello World!", 4096); // Use flush () to send the string to the browser. 'options' => apply_filters('tutor_monetization_options', array( //add new monetization options here 'free' => __('Disable Monetization', 'tutor'), )), return apply. ob_clean (): void. answered Oct 8. ob_get_clean returns a string of whatever has entered the output buffer since your ob_start () call and then deletes the contents from the buffer (in this particular example you never set the output of this function to anything, so your code should do nothing). php: ob_end_flush() stops header() from working. The output buffer must be started by ob_start () with PHP_OUTPUT_HANDLER_CLEANABLE flag. This function does not destroy the output buffer like ob_end_clean () does. Asking for help, clarification, or responding to other answers. Apart from the fact that this code is a total mess and that its syntax is incorrect because of the lack of semicolon at the end of ob_flush() call, the main problem is that the filenames you read from the templist. In PHP 8. Learn more. 22. The ob_get_contents() function is a useful tool for getting the contents of the output buffer in. This function will send the contents of the output buffer (if any). Une des plus pratique est ob_get_contents qui permet de récupérer le contenu du tampon de sortie dans une. ob_get_contents(); ?> flush 함수는 출력물을 브라우저로 보내고, 출력 버퍼를 비우는 역할을 하지만, 서버나 클라이언트에 영향을 주지 않습니다. This one uses ob_get_clean() and does not produce the correct result:Wordpress: ob_get_clean(); doesn't return $value in shortcode?Helpful? Please support me on Patreon: thanks & prai. ob_gzhandler() - Được sử dụng như một hàm gọi lại cho ob_start() để nén nội dung của bộ đệm khi gửi nó đến trình duyệt. Just make sure that you call ob_end_flush() the appropriate number of times. Be sure your includes do not already send something to the browser. The output buffer must be started by ob_start with PHP_OUTPUT_HANDLER_FLUSHABLE flag. ob_clean (): bool. I'm using PHP 5. Teams. The most common is wkhtmltopdf, which is a binary that include Chrome's rendering engine webkit to interpret the page and print the pdf. ob_get_clean ( ): string|false. 現在のバッファの中身を取得し、出力バッファを削除します。 ob_get_clean() は、基本的に ob_get_contents() および ob_end_clean() を同時に実行するのと同じです。 出力バッファを開始するときに、 ob_start() で PHP_OUTPUT_HANDLER_CLEANABLE および PHP_OUTPUT_HANDLER_REMOVABLE フラグを指定する必要があります。Gets the current buffer contents and delete current output buffer. You would call this function last in the output buffering process because if you need to get or send the content stored in the output buffer, calling ob_clean() would clean the contents of the output buffer and there won't be any content to receive or send. The output buffer must be. After creating a custom shortcode and inserting it into any page position, it also shows up at the top of the page, but only in Edit mode. Hi, i am using 0. Take a look at very simple example for PHP 5. 3. Show file. 3. ob_get_flush flushes the output buffer, return it as a string and turns off output buffering. For example: use function OutputControlob_start; use function OutputControlob_end_flush; use function OutputControlob_get_clean; ob_start ();. No examples exist of running ob_get_clean within a while loop, and for my purpose there is no alternative. The reason I'm not voting for ob_get_clean is because I've had times when other developers get confused regarding what is really going on, the function name doesn't really state that the output buffering will end after it's call. Milo Milo. Basically you just wrap your html in ob_start(); this will return the html as a string so you can echo it. I was trying to debug my code using error_log() and I discovered that ob_get_clean() also truncates the error_log() buffer right in the middle of its output, and well as the output buffer which it is supposed to truncate. Improve this answer. ob_get_clean () remove value of input. d4rkpr1nc3. 出力バッファを「フラッシュ(出力)」してから、出力のバッファリングをオフにする。. In theory when I call _insert() function in test. ob_start(): ob_start — Turn on output buffering. ini. ob_get_clean, only works twice. htmlentities () takes an optional third argument encoding which defines encoding used in conversion. The ob_start () function is a useful tool for buffering your output in your PHP web application. ob_get_contents() fetches whatever is inside the buffer. PHP output buffer issue when using ob_gzhandler and ob_clean together. Có nhiều lợi ích khi sử dụng ob_start trong PHP, bao gồm: Giảm tải server: ob_start có thể giúp giảm tải server bằng cách lưu trữ toàn bộ dữ liệu đầu ra trong bộ đệm (buffer) trước khi gửi nó đến trình duyệt. Remember you need to clean the output buffer (ob_end_clean();) before the end of the file, or the page content could be outputted twice. ) The buffer is limited in size, and can easily overrun when left to defaults. El búfer de salida debe estar iniciado por ob_start () con el indicador PHP_OUTPUT_HANDLER_CLEANABLE Si no, ob_get_clean () no funcionará. this is how I am inlcuding the html template in my shortcode function. 3. The ob_get_clean() function returns the contents of the output buffer and then deletes the contents from the buffer. Seems like ob_get_contents(); is not working because the code appears at the beginning of the page which means its being executed as the variable is being declared. 0, but it seems that the function is deprecated in 4. 0, PHP 5, PHP 7) ob_get_clean — Get current buffer contents and delete current output buffer Description ob_get_clean ( ) : string Gets the current buffer contents and delete current output buffer. you have to use the new aliases instead of using the PHP 7. php some other way. Since `ob_get_clean()` accumulates the entire output in memory, dealing with large amounts of data might affect performance and memory usage. " Actually, the callback function, once set by ob_start (), will be called regardless. ob_get_clean — 得到当前缓冲区的内容并删除当前输出缓冲区 说明 ¶ ob_get_clean (): string|false 得到当前缓冲区的内容并删除当前输出缓冲区。 ob_get_clean () 实质上是一. It is based on FPDF and HTML2FPDF, with a number of. In this circumstance, the view process echoes the content of site first anomalously before the response sends cookie, headers, and content. If you are using error_log(), use ob_get_contents() and ob_end_clean() instead of ob_get_clean(). Something like this:. 4. For what you are trying to do, there is no need to use ob_start and ob_flush. El búfer de salida debe estar iniciado por ob_start () con el indicador PHP_OUTPUT_HANDLER_CLEANABLE . The call to ob_get_clean will return the contents of your buffered output. There's a limit to how much there can be buffered which by default is 4KB so you are hitting the maximum with your script. x and PHP 5. Follow edited Oct 8, 2014 at 1:22. 1 version of dompdf on my web server (PHP/5. Add a comment | 0 The Problem is, you are replcing tho variables from one source. So, fortunatly there is some php tools that do interpret the page and can fetch any sub files. if you call ob_end_clean() after ob_start("ob_gzhandler"), the "Content-Encoding: gzip" header will still get sent (assuming the browser supports the encoding). answered May 17, 2012 at 13:57. I pass the. If you want to use it for a larger buffer you have to edit your php. ) of the included file and use the output in a variable (string)?Do you want to return certain values from the included files and use them as a variable in your host script?; Local variables in your included files will always be moved to the current scope of your host script - this. –As posts get their data set up via the_post() (respectively via setup_postdata()) and are therefore accessible through the API (get_the_ID() for e. don't close the connection). From PHP 5. So as i'm only using ob_get_clean to stop junk being passed back is there any implications to not using ob_start? Test Code:PHP - ob_flush - clean old text and print new text in loop Hot Network Questions A stranger messaged me “please put 10 dollars on my card”, followed by a card number. 5. También se usa para obtener el búfer de salida nuevamente después de limpiar el búfer. header () cannot be used once any output has begun. , ob_get_clean() would only return the contents of style. g. Esta función desecha el contenido del búfer de salida. - The shutdown function would call ob_get_clean() again, and write the result to watchdog. Just wanted to get this out there in case anyone needed it. g. I wrote these two simple (and hacky) scripts to demonstrate. Make sure you customize your style as per your theme. The browser should then only get gz-encoded data as it was the output buffer at the topmost level. I realize that these are different "versions" of php but i feel like this should work. También se usa para obtener el búfer de salida nuevamente después de limpiar el búfer. Here's my function:The ob_get_contents () function has different return behaivor in PHP 5. 43. The ob_clean () function is a useful tool for clearing the output buffer in your PHP web application. thanks! – Alexandru Trandafir Catalin Sep 29, 2014 at 7:45Using the output buffer for this is not a very clean solution. Your shortcode callback is going to output content rather than return it which is why you're seeing it appear at the top of your page. to wit: given: ob_start(); echo 'before'; ob_start(); echo 'second';If you want to integrate a new plugin to sell courses and include the selection option in Tutor LMS > Settings > Monetization, then you can use the tutor_monetization_options filter. He just warns that you should really only use it if there is no other way as there are drawbacks which you might. For text-logfile/debugging needs, I want all , , multiple spaces and so on to be cleared. If you want to further process the buffer's contents you have to call ob_get_contents () before ob_end_clean () as the buffer contents are discarded when ob_end_clean () is called. No, this is not a correct use for ob_start(). Share. Some parameters will be different depending on the include. Tôi nhắc đến cơ chế cache vì các hàm ob_start (), ob_get_contents (), ob_clean (), ob_end_flush () sẽ hỗ trợ chúng ta trong quá trình thực hiện cơ chế. php Project: jiatower/php. This will help you better understand. <?php ob_start (); echo 'a'; print 'b'; // some statement that removes all printed/echoed items ob_end_clean (); echo 'c'; // the final output is equal to 'c', not 'abc' ?>. Descrição ¶. it will work as you would use ob_start with no. 24. ob_get_length() gets the size of the buffer, in bytes. I am trying to get the browser timezone via JavaScript and capture it in a php variable with ob_start() and ob_get_clean. 5. Improve this answer. PHP provides a set of functions that control what content is sent to the browser and when. Definition and Usage. Learn more about TeamsIt is that the ob_start, ob_get_clean don't work synchronously in the view process causes the problem. David Barker David Barker. ob_get_clean(); // 출력물을 변수에 저장만 합니다.