Archive:

 

Archive for July, 2008


Handling directories and files with PHP is a snap. However, with this handy function you can always be sure that the destination directory path for your files will exist. If you pass a path with a filename at teh end, set the second parameter to true eg make_path($path, true) PLAIN TEXT PHP: /*Create  Directory Tree [...]



 

If you are trying to get a curl script which needs follow on location functionality to run on a server which has either open_basedir or safe mode enabled you will get an error message similar to the following: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set After a bit of digging, [...]



 

Creating regular expressions can sometimes be a frustrating experience. Generally I find using regular expressions intuitive and easy, with quick and powerful results. However every now and then you stumble into a regular expression scenario that you just can't seem to crack. When this happens you might find yourself trying and trying different regular expressions [...]



 

Some people like their excel files. For people who want their data exported in an excel format checkout this chunk of code. It's really easy First of all you need to download this php excel class Now try this code: PLAIN TEXT PHP: $query = mysql_query("select * from table"); while($q = mysql_fetch_assoc($query)){     $output[] [...]



 

I have recently completed the second stage of development for my ultimate oscommerce checkout system. This is a replacement for the standard osCommerce checkout which splits into numerous stages, meaning that to actually place an order meant visiting about 5 different pages. My system rolls every single stage into a single page for entering details [...]