PHP isn’t always easy
I used to think PHP was just for half-arsed programmers who didn’t know how to use a strongly typed language. However I’ve been using PHP to write one of Europe’s busiest web sites for a year now. PHP is simple but effective in a lot of ways. I still find things that are really tough though.
My current dilly of a pickle is trying to issue the user a response and then carrying on doing stuff. There just isn’t a sane way to do it. The obvious thing would be to construct some output using say header() and then set ignore_user_abort(). When the user leaves the page should carry on processing. I tried calling ob_flush() and flush() to send out the response, but it doesn’t wanna. Weird.
Currently I’m restructuring my classes to have ‘with user’ and ‘without user’ classes. It just seems inelegant to me and I don’t like it. If anyone has a better way please let me know.
Technorati Tags:
php, webdevelopment, ignoreuserabort, obflush, flush





Add New Comment
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Add New Comment