get_file_info()

get_file_info($file[, $returned_values = array('name', 'server_path', 'size', 'date')]) Parameters: $file (string) – File path $returned_values (array) – What type of info to return Returns: An array containing info on the specified file or FALSE on failure Return type: array Given a file and path, returns (optionally) the name, path, size and date modified information attributes for a file. Second parameter allows you to explicitly declare what information you want returned. Valid

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

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

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');

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

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_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_reset()

form_reset([$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 reset button tag Return type: string Lets you generate a standard reset button. Use is identical to form_submit().