Posts Tagged ‘php’

Protected: Learning PHP 5 – O’Reilly

on Monday 10th March, 2008 Gabe speculated thusly…

This post is password protected. To view it please enter your password below:


Posted in Books, Information, PHP, Programming

Enter your password to view comments

Protected: Pro PHP Security

on Thursday 6th March, 2008 Gabe speculated thusly…

This post is password protected. To view it please enter your password below:


Posted in Books, Information, PHP, Programming

Enter your password to view comments

Protected: CodeIgniter for Rapid PHP Application development

on Thursday 6th March, 2008 Gabe speculated thusly…

This post is password protected. To view it please enter your password below:


Posted in Books, CodeIgniter, Frameworks, Information, PHP, Programming

Enter your password to view comments

Linking images in Code Igniter

on Sunday 17th February, 2008 Gabe speculated thusly…

I’m a big fan of the PHP framework, CodeIgniter. However, until recently it has lacked an elegant way of nesting an image in an anchor tag. I had to resort to manually typing out HTML like this:
<a href="<?=site_url?>/controller/action"><img src="<?=base_url()?>/images/button.gif"></a>
CodeIgniter 1.6 has been released, quickly followed by 1.6.1. This includes an image helper. One is still unable to elegantly link images using CI’s helpers. If you want to be able to do something like this:
<?= anchor( 'controller/action', img( 'images/button.gif' )?>

You could just comment out line 117 in /system/helpers/url_helper.php but that means you are altering CI core, which is not a good idea. For a start it will be overwritten when you upgrade and it is an inelegant hack.

A better bet is to create your own helper file and use it to override CodeIgniter’s one. This is dead-simple, just create a file called MY_url_helper.php in the following location /system/application/helpers/. Note that the MY_ prefix is set in the config.php file under $config['subclass_prefix'] = 'MY_'; so if you have changed that setting you will need to adjust your file-name accordingly.

Then just copy and paste the following in to it: (more…)

Posted in CodeIgniter, Development, Frameworks, PHP, Programming

7 Comments »

Getting Lighttpd 1.4 and PHP 5 to work on FreeBSD

on Wednesday 26th September, 2007 Gabe speculated thusly…

Firstly let me just say that I had quite a few problem with Lighttp (aka Lighty), and some of them related to PHP. However, I now have Lighty, PHP, and MySQL playing nicely and… it’s fast! This was tested with: Lighty 1.4.18 and PHP 5.2.3_1 on FreeBSD 6.2. (more…)

Posted in FreeBSD, HowTo, Server

No Comments »