Mark’s Site

Pensieve for coding and golf :-)

Archives for the ‘3.1. Useful Functions’ Category

Connect To Database

By admin • Apr 28th, 2008 • Category: 3.1. Useful Functions

I find it’s always useful to keep this functionality in a function. This example relies on some global variables …pretty easy to understand.



Get Files From Folder

By admin • Apr 28th, 2008 • Category: 3.1. Useful Functions

Need to get a list of files from a folder on your server? Maybe it’s a list of photos that you want to manipulate with PHP, this function will grab all files from a specified directory and return them in an array for you.



Encryption and Decryption

By admin • Apr 28th, 2008 • Category: 3.1. Useful Functions

Something I struggled to find when starting out was good, non standard encryption and decryption functions. Here’s a couple for you to use/adapt as you wish.