flush() before exitting;
Main Topics
Browse All TopicsHi,
I've created a class which has a WriteError() method. WriteError() displays a table with error information. Once this does its thing, I want it to stop doing anything else. If I enter "die()" or "exit;" the information isn't displayed on the page.
Is there an intermediate way of getting it to show the information and stop without an all-out die()?
TIA.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Been using it (PHP5) for quite a while now, and plan on releasing it on a production system in a few months. Wrote some OOP DB access code using PHP5 at http://homepage.mac.com/sb
<?php
class testdie {
function class_error($text) {
echo $text;
die("");
}
}
echo "before error<br>";
$tr=new testdie;
$tr->class_error("This is error<br>");
echo "after error<br>";
?>
Just tested this simply code and everythiong is ok. Do you use buffering output? But anyway is have to work!
---
<?php
ob_start("ob_gzhandler");
class testdie {
function class_error($text) {
echo $text;
die("");
}
}
echo "before error<br>";
$tr=new testdie;
$tr->class_error("This is error<br>");
echo "after error<br>";
?>
Business Accounts
Answer for Membership
by: ThGPosted on 2003-07-25 at 07:18:18ID: 9004461
maybe put that code inside a function() and use a return when you want it to stop processing those section?