Code solutions to PHP, JS, CSS

Spread your code soluces to the world

Love me

Search results for : dir    (5)

Image class resize and rounded mask (php gd image)

This PHP GD class offers several useful features. It resizes images, apply a rounded mask with various options : • output size • crop mode : crop to fill, fill to fit • rounded corners or square • color of the rounded mask It is complete and usable in all cases. This class use the PNG mask round_440.png

Simple image gallery PHP (php)

The following code is an image gallery script in PHP as easy as possible. A single file of a few lines of code is sufficient to list the images, create thumbnails and display them. Copy the entire code into a PHP file. Name it as you wish and drop it in a directory containing images. For reasons of simplicity, this code has no error handling....

Make dir and upload files via FTP (php)

These two functions simplify the creating directory and files upload by FTP in PHP.

Simple method : listing files from a directory (php)

Here's my simple method for listing files from a directory. In this example I added the natural sort and the file sizes in KB to show how to combine tables and serialized values.

Create virtual folders using htaccess (htaccess)

These 3 lines of code for .htaccess create virtual folders. An URL like will be understood by the server as