17 January 2010

Portfolio: Rabbi Ryan Goldstein

Basically this website is very simple. Does have a back end to upload the items.

www.rabbiryan.co.za


index.php shows blank page

It does happen sometimes that when you put your newly developed web application to a server it shows a blank page on start up. If you have it on your local machine and it shows 'unable to connect', that normally means that your wampserver or xampp is not running. Turning on your apache server will normally fix it for local development, but what about when it happens on the server?

I've found that the first thing you should look at is your capitalization. I once had a file in my application/views/helpers that started with a small letter, and that caused me a blank page. So be sure to check the capitalization of all your files on the server.

10 October 2009

Portfolio: Alsafe

Alsafe was the first website I made in my career of web development. This was when I started my career on 12 Oct 2008. It was still procedural code, so nothing out of the ordinary. It has a cart-to-quote system.


08 October 2009

Using output buffering

I prefer to use output buffering. It's useful if you have a page which have a lot of dynamic content that needs to be processed or rendered. It prevents that the page loads in parts. It will allow that the output is sent all at once to the user's browser.

I start and end the buffering at the beginning and end of my layout script.

To start put ob_start() at the beginning. This function will turn output buffering on. While output buffering is active no output is sent from the script (other than headers), instead the output is stored in an internal buffer.

To end put ob_end_flush() at the end of the layout script. This function will send the contents of the topmost output buffer (if any) and turn this output buffer off.

There is also other function regarding output buffering available:

  • ob_get_contents() - Return the contents of the output buffer
  • ob_get_flush() - Flush the output buffer, return it as a string and turn off output buffering
  • ob_flush() - Flush (send) the output buffer
  • ob_end_clean() - Clean (erase) the output buffer and turn off output buffering

You can also gzip the output of the buffer. For that you have to call ob_start('ob_gzhandler'). But that should generate a warning as content is already being gzipped normally. To use this you have to turn off output compression in the php settings. Not recommended.

01 September 2009

jFlot jquery graphing

first screencast, hope it works (doubt it considering the software and mic i used). it's about jFlot, a jquery plugin to render graphs. quite neat (for me at least).