Posts About php

Jan
24
January 24, 2011

Lately I had to do some work for the status.arrowquick.com website that involved learning about anonymous functions. What I needed to do was add the appropriate CSS class to each hyperlink inside a bit of HTML. To do this, I chose to use preg_replace_callback(), which replaces a matching string with the results of a specified function. $cat_class_callback_info […]

Feb
20
February 20, 2007

You may have come across a problem in PHP where user sessions (ie, from $_SESSION) expire earlier than you expect. Now, there’s many different settings that can affect PHP sessions. Besides any application preferences, PHP has settings like session.gc_probability and session.gc_maxlifetime. But none of these matter if you don’t change session.save_path. By default, sessions are saved […]