logo
Currently Browsing: Web Development
May
14

Codeigniter Vanity / Username / Personalised URL’s

Vanity URL’s are best described as a personalised URL, for example if you want to create a website where a user has their own space, e.g. example.com/username. Companies use this method to advertise a specific product as it’s easy to remember and more to the point. I decided to give the a whirl in Codeigniter which out of the box does not allow this to happen because of the MVC pattern. If you...
Apr
16

PHP 5.4 Shorter Array Syntax

I use PHP pretty much every single day from an in house content management system, to WordPress to Zencart and bespoke stuff. I’ve been keeping a close eye on the latest PHP developments and i’m so glad they have implemented Javascript’s syntax for handling arrays. You did simple arrays the old way like this:- $array = array( "foo" => "bar", "bar" =>...
May
28

Redirect http to https htaccess apache

Are you wondering how to redirect to SSL via htaccess? Alot of users won’t type in the https or even http for that matter so if your site has an SSL certificate you will want to make sure your visitors get redirected to the secured site. This is very useful for websites with a secure layer. I will explain in this post exactly how to achieve this. Presuming you have an Apache server, first off you...
Feb
9

Alternate row colour in PHP

Over the past couple of months I’ve been developing a content management system to give myself something to aim for and achieve. What I do with the system is unknown, maybe I’ll start using it at work. Anyway, I’ve been posting some stuff on here that I may find userful for other developers, whether they know how or not. I wanted to do some alternative row colour for some table results...
Dec
10

Exiting a foreach loop in PHP

When developing using PHP you’ll run into differen’t type of loops; while, for, foreach. Some web developers have a personal preference and try to use that loop for pretty much everything they do. Some loops work better for differen’t things while others don’t perform very well. One of my favourite loops is the foreach loop. One thing I ran into was exiting the loop when after say 3...
Nov
22

Why I Use Codeigniter For My Web Applications

A web developer at some point will look at how they can speed up their development and how to make it easier to develop web applications. If you want to make this possible you are going to have to look for a framework. The dynamic language i use is PHP because of it’s easy learning curve. I’ve had a dabble with other languages such as ASP, i found PHP the easiest and it’s more widely...
Nov
18

An XSLT stylesheet does not have an XML mimetype

If you take a look at your stylesheet whether it’s for a blog or a normal website (usually found at domain.com/sitemap.xml), does it throw up the following error: An XSLT stylesheet does not have an XML mimetype? If so what you need to do is put a .htaccess file in the root of your server (if you don’t already have one) and add the following to the bottom: AddType text/xsl .xsl What this...
Page 1 of 212
logo
© daparky.com 2011