From 6a857c3815458df3e2824b047e5e17e87142c829 Mon Sep 17 00:00:00 2001
From: Derek Allard The above code tells the image_resize function to look for an image called mypic.jpg
-located in the source_image folder, then create a thumbnail that is 75 X 50 pixels using the GD2 image_library.
+located in the source_image folder, then create a thumbnail that is 75 X 50 pixels using the GD image_library.
Since the maintain_ratio option is enabled, the thumb will be as close to the target width and
height as possible while preserving the original aspect ratio. The thumbnail will be called mypic_thumb.jpg
The 14 available preferences described below allow you to tailor the image processing to suit your needs.
+The preferences described below allow you to tailor the image processing to suit your needs.
Note that not all preferences are available for every function. For example, the x/y axis preferences are only available for image cropping. Likewise, the width and height @@ -464,7 +464,7 @@ $this->image_lib->watermark();
The above example will use a 16 pixel True Type font to create the text "Copyright 2006 - John Doe". The watermark will be positioned at the bottom/center of the image, 20 pixels from the bottom of the image.
-Note: In order for the image class to be allowed to do any processing, the image file must have file permissions of 777.
+Note: In order for the image class to be allowed to do any processing, the image file must have "write" file permissions. For example, 777.
Takes an IP address as input and returns TRUE or FALSE (boolean) if it is valid or not. Note: The $this->input->ip_address() function above validates the IP automatically.
-if (! valid_ip($ip))
+if (! $this->input->valid_ip($ip))
{
echo 'Not Valid';
}
--
cgit v1.2.3-24-g4f1b