I hate compressing CSS files as they become totally unreadable for editing. I end up keeping 2 versions, compressed and uncompressed, etc.. But how about compressing all your CSS files into one file, ‘on-the-fly’. Now that has solved the problem.
Posts Tagged ‘ PHP ’
Just a little script I wrote to work out the date of the first day of the week.
[More]
PHP Classes – quick example
June 16, 2010 | Comments | Uncategorized
How To Download and Upload Files Over FTP
June 16, 2010 | Comments | Uncategorized
Taken from http://mypaaji.com/Index.php/how-to-download-upload-transfer-files-over-ftp/
The below given listing illustrates the process. First, a connection to the FTP server is initialized with a call to ftp_connect(); this function returns a connection handle that is used in all subsequent calls. The ftp_login() function is then used to log in to the server, while the ftp_close() function is used to terminate the connection and end the session. Between the calls to ftp_connect() and ftp_disconnect(), it is possible to perform all the actions commonly associated with an FTP session.
The below given listing illustrates four of the most common: listing files using ftp_nlist(); uploading files with ftp_put(); downloading files with ftp_get(); and deleting files with ftp_delete(). Note that ftp_put() and ftp_get() must be supplied with the remote and local file name, together with the transfer type (binary or ASCII).
Using $_SESSIONS… Forgot the syntax… Here-ya-go.
[More]
SEO is becoming more and more important, and URL’s need to be more visible. Here’s a function for creating a ‘slug’ which I used as an add-on to a site, using the page title.
[More]
A full(-ish) list of MIME Types that may come in usefull for upload validatiuon.
[More]
This value is generally set in the httpd.conf (server) file, which is generally not accessible to users on shared hosting packages. So, here are a few ways to get around this.
[More]
Displaying the day-part of the date, followed by the month etc. just looks plain wrong and lazy – ’20 September 2009′. ’20th’ would look much nicer and can be achieved without too much hard work. A simple function…
[More]
Backing up a MySQL database using PHP.
[More]