The PHP closing tag( ?> ) on a PHP document is optional to the PHP parser. However, if used, any whitespace following the closing tag, whether introduced by the developer, user, or an FTP application, can cause unwanted output, PHP errors, or if the latter are suppressed, blank pages. I think you have faced this frustrating issues and had to waste your valuable time to debug. For this reason, all PHP files should OMIT the closing PHP tag, and instead use a comment block to mark the end of file and it’s location relative to the application root. This allows you to still identify a file as being complete and not truncated. Here is an example: Continue reading →
Archive for April, 2011
In this tutorial you will learn about css sprites.
Sprite means one big image. You may seen css techniques where developer use css sprites.
When you hove on a button or image it will changed the background. But if you see thee css
then you will see that there they use one image rather than use two images.
By combining different image we make image sprites.
I haven’t used CSS Sprites in the past time. As i am developed and not expert on photo shop so i just used separate image.
After reading yahoo’s Best Practices for Speeding Up Your Web Site. I think that we have to use
css sprites. So i used css sprites for our this product. smart-social-network-count-wordpress-plugin
Here is the template image
Before use css sprite used 7 images which size is 9.56 KB (9,791 bytes)
Afer uses css sprite : 9.52 KB (9,749 bytes)
Continue reading →
There is lots of exception or error handling in .NET. But if you want to create a custom error exception for your particular code then you can create your own error handling. We need to create a custom exception in our business layer so that the customer can’t use the same code in other domain. He can only use that code in particular domain or activation key. You can build you own login to make this work with you activation key. I just show how can you restricted them to you other domain.
So we restricted the user not to use our application other then www.learneveryday.net or containing learneveryday
at first i create a custom exception class DomainValidationException and inherit the System.ApplicationException
Continue reading →