Validus … talkin bout <code> n sh!t

5Mar/120

CodeIgniter – Bonfire

Posted by Joey

Trying out a nice little admin app called ‘Bonfire’ for my next PHP project. It backs on to the Code Igniter framework, so already it sounds awesome!

The guys at Bonfire have made it easy to jump into creating you’re next project. With all the essentials such as Users, Roles & Logins taken care of by Bonfire’s core modules, you can dive straight into… Continue reading

Filed under: PHP No Comments
14Sep/110

php split()

Posted by Joey

Bit behind the eight ball, but the php function split(string $pattern, string $string) is depreciated. Instead use explode(string $delimiter, string $string)

1

For more info… http://php.net/manual/en/function.explode.php

Filed under: PHP No Comments
1Aug/110

PHP Single vs Double quotes

Posted by Joey

Had a question yesterday…

Is it bad practice to use double quotes (“) for almost all my expressions in…well, anything? As opposed to a single quote? I know there’s a difference between the two and when to use it, but is it just generally better practice to use single instead of double? Most developers I see use single quotes for almost everything.

Quick answer, there’s no… Continue reading

Filed under: PHP No Comments
8Dec/100

Dynamic calling function in php

Posted by Joey

Had a problem with trying to keep things DRY in PHP. I needed a better solution that hard coding every single function name in a case statement.

I found a great function that handles this, call_user_func()

http://php.net/manual/en/function.call-user-func.php
1

This will return the… Continue reading

Filed under: PHP No Comments
24May/100

Better Server Setup for CI

Posted by Joey

I’ve been using Code Igniter (CI) for a lil bit, but one of the things I noticed… with most frameworks – you need to keep re-creating the entire framework folder for each app.

The best thing to do is keep it in one spot, and map to it relatively. I’ve done this all the time in CF – which is heaps easy to do with the CF Admin -… Continue reading

Filed under: PHP, Stuff No Comments