Comments

PHP isn’t always easy

Posted by sh1mmer on Aug 8, 2007 in General

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:
, , , ,

Copyright © 2009 Kid666 Blog All rights reserved. Base theme by Laptop Geek.