get_filenames()

get_filenames($source_dir[, $include_path = FALSE]) Parameters: $source_dir (string) – Directory path $include_path (bool) – Whether to include the path as part of the filenames Returns: An array of file names Return type: array Takes a server path as input and returns an array containing the names of all files contained within it. The file path can optionally be added to the file names by setting the second parameter to TRUE. Example: $controllers = get_filenames(APPPATH.'controll

get_dir_file_info()

get_dir_file_info($source_dir, $top_level_only) Parameters: $source_dir (string) – Directory path $top_level_only (bool) – Whether to look only at the specified directory (excluding sub-directories) Returns: An array containing info on the supplied directory’s contents Return type: array Reads the specified directory and builds an array containing the filenames, filesize, dates, and permissions. Sub-folders contained within the specified path are only read if forced by sending the

get_cookie()

get_cookie($index[, $xss_clean = NULL]) Parameters: $index (string) – Cookie name $xss_clean (bool) – Whether to apply XSS filtering to the returned value Returns: The cookie value or NULL if not found Return type: mixed This helper function gives you friendlier syntax to get browser cookies. Refer to the Input Library for detailed description of its use, as this function acts very similarly to CI_Input::cookie(), except it will also prepend the $config['cookie_prefix'] that you mi

get_clickable_smileys()

get_clickable_smileys($image_url[, $alias = ''[, $smileys = NULL]]) Parameters: $image_url (string) – URL path to the smileys directory $alias (string) – Field alias Returns: An array of ready to use smileys Return type: array Returns an array containing your smiley images wrapped in a clickable link. You must supply the URL to your smiley folder and a field id or field alias. Example: $image_array = get_clickable_smileys('http://example.com/images/smileys/', 'comment');

Getting Started With CodeIgniter

Any software application requires some effort to learn. We’ve done our best to minimize the learning curve while making the process as enjoyable as possible. The first step is to install CodeIgniter, then read all the topics in the Introduction section of the Table of Contents. Next, read each of the General Topics pages in order. Each topic builds on the previous one, and includes code examples that you are encouraged to try. Once you understand the basics you’ll be ready to explore the Class

General Topics

CodeIgniter URLs Controllers Reserved Names Views Models Helpers Using CodeIgniter Libraries Creating Libraries Using CodeIgniter Drivers Creating Drivers Creating Core System Classes Creating Ancillary Classes Hooks - Extending the Framework Core Auto-loading Resources Common Functions Compatibility Functions URI Routing Error Handling Caching Profiling Your Application Running via the CLI Managing your Applications Handling Multiple Environments Altern

function_usable()

function_usable($function_name) Parameters: $function_name (string) – Function name Returns: TRUE if the function can be used, FALSE if not Return type: bool Returns TRUE if a function exists and is usable, FALSE otherwise. This function runs a function_exists() check and if the Suhosin extension <http://www.hardened-php.net/suhosin/> is loaded, checks if it doesn’t disable the function being checked. It is useful if you want to check for the availability of functions such as

form_upload()

form_upload([$data = ''[, $value = ''[, $extra = '']]]) Parameters: $data (array) – Field attributes data $value (string) – Field value $extra (mixed) – Extra attributes to be added to the tag either as an array or a literal string Returns: An HTML file upload input field tag Return type: string This function is identical in all respects to the form_input() function above except that it uses the “file” input type, allowing it to be used to upload files.

form_textarea()

form_textarea([$data = ''[, $value = ''[, $extra = '']]]) Parameters: $data (array) – Field attributes data $value (string) – Field value $extra (mixed) – Extra attributes to be added to the tag either as an array or a literal string Returns: An HTML textarea tag Return type: string This function is identical in all respects to the form_input() function above except that it generates a “textarea” type. Note Instead of the maxlength and size attributes in the above example, you wi

form_submit()

form_submit([$data = ''[, $value = ''[, $extra = '']]]) Parameters: $data (string) – Button name $value (string) – Button value $extra (mixed) – Extra attributes to be added to the tag either as an array or a literal string Returns: An HTML input submit tag Return type: string Lets you generate a standard submit button. Simple example: echo form_submit('mysubmit', 'Submit Post!'); // Would produce: <input type="submit" name="mysubmit" value="Submit Post!" /> Similar to oth