PHP Catch "Empty" Includes -


We have a custom framework that we use, which we should include to other pages Allows code in However, the title of this code is always printed, even if contains code does not output anything, is there any way that I get to exit , or return Can I do something special, that I can trace and hold through included / , so that I can do the right thing?

Activate the output buffer, include the file then check for its content:

  ob_start (); Include "File.php"; $ Content = ob_get_contents (); Ob_end_clean (); 


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -